mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
Handle NULL buffer in GetObject.
This commit is contained in:
parent
7018230a3f
commit
e9280a1eec
1 changed files with 4 additions and 2 deletions
|
@ -672,7 +672,8 @@ static INT FONT_GetObjectA( HGDIOBJ handle, void *obj, INT count, LPVOID buffer
|
|||
FONT_LogFontWToA( &font->logfont, &lfA );
|
||||
|
||||
if (count > sizeof(lfA)) count = sizeof(lfA);
|
||||
memcpy( buffer, &lfA, count );
|
||||
if(buffer)
|
||||
memcpy( buffer, &lfA, count );
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -683,7 +684,8 @@ static INT FONT_GetObjectW( HGDIOBJ handle, void *obj, INT count, LPVOID buffer
|
|||
{
|
||||
FONTOBJ *font = obj;
|
||||
if (count > sizeof(LOGFONTW)) count = sizeof(LOGFONTW);
|
||||
memcpy( buffer, &font->logfont, count );
|
||||
if(buffer)
|
||||
memcpy( buffer, &font->logfont, count );
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue