summaryrefslogtreecommitdiff
path: root/extra/icewm/wmclient.patch
blob: 95f00614de32d38110790d46297edd159a227be5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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);