-Fabian Mewes:

Fix the out-of-bound read of the NUL byte using strlen() in
microhttpd/daemon.c:MHD_init_daemon_certificate()

Fix the out-of-bound read of the NUL byte using strlen() in
microhttpd/daemon.c:MHD_init_daemon_certificate()
This commit is contained in:
Christian Grothoff
2016-02-29 12:27:57 +00:00
parent 601164fa35
commit d3b17d3b19
+2 -1
View File
@@ -98,12 +98,13 @@ load_file (const char *filename)
if (!fp)
return NULL;
buffer = malloc (size);
buffer = malloc (size + 1);
if (!buffer)
{
fclose (fp);
return NULL;
}
buffer[size] = '\0';
if (size != fread (buffer, 1, size, fp))
{