aboutsummaryrefslogtreecommitdiffstats
path: root/x11/imlib2/bufferoverflow.patch
blob: 397b43fb8c41e7b715b285924d957c605f8b7bfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- src/modules/loaders/loader_xpm.c
+++ src/modules/loaders/loader_xpm.c.new
@@ -246,8 +246,8 @@
                                  return 0;
                               }
                             ptr = im->data;
-                            end = ptr + (sizeof(DATA32) * w * h);
                             pixels = w * h;
+                            end = ptr + pixels;
                          }
                        else
                          {