slackbuilds_ponce/desktop/icewm/patches/wmclient.patch
Robby Workman d711d31700 desktop/icewm: Reverted to 1.3.7 plus some more patches
Thanks again to Janusz Kuśnierek for assistance with this
and for noting a couple of fairly major bugs wrt usability
that make the revert desirable.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2014-04-12 13:59:48 -05:00

25 lines
1.3 KiB
Diff

diff -uNr icewm-1.3.7.orig/src/wmclient.cc icewm-1.3.7/src/wmclient.cc
--- icewm-1.3.7.orig/src/wmclient.cc 2012-05-27 11:54:25.663101746 +0200
+++ icewm-1.3.7/src/wmclient.cc 2012-05-27 12:17:40.236339580 +0200
@@ -1044,20 +1044,11 @@
while (XGetWindowProperty(display, handle,
propAtom, (itemCount * itemSize) / 32, 1024*32, False, AnyPropertyType,
&r_type, &r_format, &nitems, &bytes_remain,
- &prop) == Success && prop && bytes_remain == 0)
+ &prop) == Success && prop)
{
if (r_format == itemSize1 && nitems > 0) {
data = realloc(data, (itemCount + nitems) * itemSize / 8);
- // access to memory beyound 256MiB causes crashes! But anyhow, size
- // >>2MiB looks suspicious. Detect this case ASAP. However, if
- // the usable icon is somewhere in the beginning, it's okay to
- // return truncated data.
- if (itemCount * itemSize / 8 >= 2097152) {
- XFree(prop);
- break;
- }
-
memcpy((char *)data + itemCount * itemSize / 8, prop, nitems * itemSize / 8);
itemCount += nitems;
XFree(prop);