slackware-current/source/x/x11/patch/libX11/libX11.fix_size.diff
Patrick J Volkerding 123fd21833 Sun Aug 2 18:20:30 UTC 2020
d/bison-3.7.1-x86_64-1.txz:  Upgraded.
d/python-setuptools-49.2.1-x86_64-1.txz:  Upgraded.
l/libcap-2.42-x86_64-1.txz:  Upgraded.
x/libX11-1.6.10-x86_64-2.txz:  Rebuilt.
  Fix size calculation in _XimAttributeToValue.
  Thanks to chrisVV and Yichao Yu.
extra/xfractint/xfractint-20.04p16-x86_64-1.txz:  Upgraded.
2020-08-03 08:59:53 +02:00

20 lines
836 B
Diff

--- ./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;