Commit 51afd09d authored by Akira TAGOH's avatar Akira TAGOH

Fix unterminated string issue

parent 37c9c16d
......@@ -193,10 +193,13 @@ FcDirCacheReadUUID (FcChar8 *dir,
if ((fd = FcOpen ((char *) uuidname, O_RDONLY)) >= 0)
{
char suuid[37];
ssize_t len;
memset (suuid, 0, sizeof (suuid));
if (read (fd, suuid, 36) > 0)
len = read (fd, suuid, 36);
if (len != -1)
{
suuid[len] = 0;
memset (uuid, 0, sizeof (uuid));
if (uuid_parse (suuid, uuid) == 0)
{
......
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