Fix buffer overflow in copying PS name
As reported on the fontconfig mailing list by Tanel Liiv. Found using American Fuzzy Lop. Upstream patch adapted to use strlcpy().
This commit is contained in:
parent
5426d10d0b
commit
8ffe8af9da
2
dist/fontconfig/src/fcfreetype.c
vendored
2
dist/fontconfig/src/fcfreetype.c
vendored
@ -1391,7 +1391,7 @@ FcFreeTypeQueryFace (const FT_Face face,
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy (psname, tmp);
|
||||
strlcpy (psname, tmp, sizeof(psname));
|
||||
}
|
||||
if (!FcPatternAddString (pat, FC_POSTSCRIPT_NAME, (const FcChar8 *)psname))
|
||||
goto bail1;
|
||||
|
Loading…
Reference in New Issue
Block a user