[PATCH 0/1] MR4831: wing32: Avoid crash in WinGGetDIBPointer when called with NULL bitmap info.
From: Bernhard Übelacker <bernhardu(a)mailbox.org> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56135 --- dlls/wing32/wing32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wing32/wing32.c b/dlls/wing32/wing32.c index b6702ba8017..14012206286 100644 --- a/dlls/wing32/wing32.c +++ b/dlls/wing32/wing32.c @@ -72,7 +72,7 @@ void * WINAPI WinGGetDIBPointer( HBITMAP hbmp, BITMAPINFO *bmi ) if (GetObjectW( hbmp, sizeof(ds), &ds ) == sizeof(ds)) { - bmi->bmiHeader = ds.dsBmih; + if (bmi) bmi->bmiHeader = ds.dsBmih; return ds.dsBm.bmBits; } return NULL; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4831
Can we have a test for this? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4831#note_57336
participants (2)
-
Bernhard Übelacker -
Zebediah Figura (@zfigura)