diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2015-01-03 16:13:17 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2015-01-03 16:13:17 +0000 |
commit | 767e61e17d8a8fd98438279ebd13e0947ed9c177 (patch) | |
tree | 77a3168ec75dfa68a89c4e50289069b7ab52c326 | |
parent | 367628db3304a1c3b889d04ee05f56c271743b25 (diff) |
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().
-rw-r--r-- | dist/fontconfig/src/fcfreetype.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/fontconfig/src/fcfreetype.c b/dist/fontconfig/src/fcfreetype.c index d271d69e2..4b2d1d188 100644 --- a/dist/fontconfig/src/fcfreetype.c +++ b/dist/fontconfig/src/fcfreetype.c @@ -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; |