aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-16 15:17:39 +0000
committermarha <marha@users.sourceforge.net>2011-02-16 15:17:39 +0000
commitaf02869c907deef944c05df9abdc364706811c08 (patch)
treeef9324e3f5cf4dcb3e7c2a9ed5b00500be45825c
parent805aafd4cb60a205a350f06da92f6981ac1d8208 (diff)
downloadvcxsrv-af02869c907deef944c05df9abdc364706811c08.tar.gz
vcxsrv-af02869c907deef944c05df9abdc364706811c08.tar.bz2
vcxsrv-af02869c907deef944c05df9abdc364706811c08.zip
Use the prop->size member to know how much data to copy
-rw-r--r--xorg-server/hw/xwin/winmultiwindowclass.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowclass.c b/xorg-server/hw/xwin/winmultiwindowclass.c
index a5cf2120a..ca08ae483 100644
--- a/xorg-server/hw/xwin/winmultiwindowclass.c
+++ b/xorg-server/hw/xwin/winmultiwindowclass.c
@@ -139,9 +139,10 @@ winMultiWindowGetWMHints (WindowPtr pWin, WinXWMHints *hints)
while (prop)
{
if (prop->propertyName == XA_WM_HINTS
+ && prop->format == 32
&& prop->data)
{
- memcpy (hints, prop->data, sizeof (WinXWMHints));
+ memcpy (hints, prop->data, 4*(int)prop->size); /* format/8 = 4 */
return 1;
}
else
@@ -224,9 +225,10 @@ winMultiWindowGetWMNormalHints (WindowPtr pWin, WinXSizeHints *hints)
while (prop)
{
if (prop->propertyName == XA_WM_NORMAL_HINTS
+ && prop->format == 32
&& prop->data)
{
- memcpy (hints, prop->data, sizeof (WinXSizeHints));
+ memcpy (hints, prop->data, 4*(int)prop->size); /* format/8 = 4 */
return 1;
}
else
@@ -260,10 +262,12 @@ winMultiWindowGetTransientFor (WindowPtr pWin, WindowPtr *ppDaddy)
while (prop)
{
- if (prop->propertyName == XA_WM_TRANSIENT_FOR)
+ if (prop->propertyName == XA_WM_TRANSIENT_FOR
+ && prop->format == 32
+ && prop->data)
{
if (ppDaddy)
- memcpy (ppDaddy, prop->data, sizeof (WindowPtr));
+ memcpy (ppDaddy, prop->data, 4*(int)prop->size); /* format/8 = 4 */
return 1;
}
else