The GNUstep gui library is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon Apple's Cocoa framework (which came from the OpenStep specification). *** Larger patches require copyright assignment to FSF. please file bugs here. ***
I've seen [Win32FontInfo setupAttributes] being called when familyName is nil, which will cause a call to wcsncpy with the second argument being NULL, resulting in an AV.
This PR works around that. In this implementation, when familyNameisnil`:
logfont.lfFaceName will not be set
CreateFontIndirectW will fail
[Win32FontInfo setupAttributes] will now return NO instead of failing with an AV
I've seen
[Win32FontInfo setupAttributes]
being called whenfamilyName
isnil
, which will cause a call towcsncpy
with the second argument beingNULL
, resulting in an AV.This PR works around that. In this implementation, when familyName
is
nil`:logfont.lfFaceName
will not be setCreateFontIndirectW
will failNO
instead of failing with an AV