mirror of
https://github.com/openbsd/xenocara.git
synced 2025-12-09 10:48:48 +00:00
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:
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;
|
||||
|
||||
Reference in New Issue
Block a user