projects
/
platform
/
upstream
/
xorg-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71b5f56
)
hw/xwin: Avoid a null dereference if CreateDIBSection() fails in NetWMToWinIconAlpha()
author
Jon TURNEY
<jon.turney@dronecode.org.uk>
Sat, 15 Jun 2013 23:07:57 +0000
(
00:07
+0100)
committer
Jon TURNEY
<jon.turney@dronecode.org.uk>
Tue, 23 Jul 2013 22:59:31 +0000
(23:59 +0100)
Avoid a null dereference of DIB_pixels if CreateDIBSection() fails in
NetWMToWinIconAlpha()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
hw/xwin/winmultiwindowicons.c
patch
|
blob
|
history
diff --git
a/hw/xwin/winmultiwindowicons.c
b/hw/xwin/winmultiwindowicons.c
index
bcc5688
..
0531ad6
100644
(file)
--- a/
hw/xwin/winmultiwindowicons.c
+++ b/
hw/xwin/winmultiwindowicons.c
@@
-257,6
+257,10
@@
NetWMToWinIconAlpha(uint32_t * icon)
DIB_RGB_COLORS, (void **) &DIB_pixels, NULL,
0);
ReleaseDC(NULL, hdc);
+
+ if (!ii.hbmColor)
+ return NULL;
+
ii.hbmMask = CreateBitmap(width, height, 1, 1, NULL);
memcpy(DIB_pixels, pixels, height * width * 4);