Commit a1ad5fe2 authored by Akira TAGOH's avatar Akira TAGOH

Allocate sufficient memory to terminate with null

parent 5ea2ab6a
......@@ -953,7 +953,7 @@ FcStrCopyFilename (const FcChar8 *s)
if (!home)
return NULL;
size = strlen ((char *) home) + strlen ((char *) s);
full = (FcChar8 *) malloc (size);
full = (FcChar8 *) malloc (size + 1);
if (!full)
return NULL;
strcpy ((char *) full, (char *) home);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment