1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 19:26:02 +00:00
nixpkgs/pkgs/development/libraries/lesstif/c-unsigned_int.patch
Pjotr Prins cb546965bc Lesstif patches - lesstif stable has not been updated in a long time and these
are recognized patches (5 out of 6 are in Debian stable). Required for
the arb package.


svn path=/nixpkgs/trunk/; revision=12952
2008-10-05 08:59:26 +00:00

39 lines
1 KiB
Diff

--- lesstif2-0.94.4.orig/lib/Xm-2.1/Xpmcreate.c
+++ lesstif2-0.94.4/lib/Xm-2.1/Xpmcreate.c
@@ -1265,10 +1265,10 @@
register char *src;
register char *dst;
register unsigned int *iptr;
- register unsigned int x, y, i;
+ register unsigned int x, y;
register char *data;
Pixel pixel, px;
- int nbytes, depth, ibu, ibpp;
+ int nbytes, depth, ibu, ibpp, i;
data = image->data;
iptr = pixelindex;
--- lesstif2-0.94.4.orig/lib/Xm-2.1/Xpmscan.c
+++ lesstif2-0.94.4/lib/Xm-2.1/Xpmscan.c
@@ -672,8 +672,8 @@
char *dst;
unsigned int *iptr;
char *data;
- unsigned int x, y, i;
- int bits, depth, ibu, ibpp, offset;
+ unsigned int x, y;
+ int bits, depth, ibu, ibpp, offset, i;
unsigned long lbt;
Pixel pixel, px;
@@ -684,6 +684,9 @@
ibpp = image->bits_per_pixel;
offset = image->xoffset;
+ if (image->bitmap_unit < 0)
+ return (XpmNoMemory);
+
if ((image->bits_per_pixel | image->depth) == 1) {
ibu = image->bitmap_unit;
for (y = 0; y < height; y++)