blob: ab2a0cf7709c4de9566ccdbca452eaa25bf95cca (
plain) (
tree)
|
|
--- ./modules/im/ximcp/imRmAttr.c.orig 2020-07-31 08:46:40.000000000 -0500
+++ ./modules/im/ximcp/imRmAttr.c 2020-08-02 13:07:15.343940851 -0500
@@ -265,7 +265,7 @@
if (num > (USHRT_MAX / sizeof(XIMStyle)))
return False;
- if ((sizeof(num) + (num * sizeof(XIMStyle))) > data_len)
+ if ((2 * sizeof(CARD16) + (num * sizeof(CARD32))) > data_len)
return False;
alloc_len = sizeof(XIMStyles) + sizeof(XIMStyle) * num;
if (alloc_len < sizeof(XIMStyles))
@@ -379,7 +379,7 @@
if (num > (UINT_MAX / sizeof(XIMHotKeyTrigger)))
return False;
- if ((sizeof(num) + (num * sizeof(XIMHotKeyTrigger))) > data_len)
+ if ((2 * sizeof(CARD16) + (num * 3 * sizeof(CARD32))) > data_len)
return False;
alloc_len = sizeof(XIMHotKeyTriggers)
+ sizeof(XIMHotKeyTrigger) * num;
|