summaryrefslogtreecommitdiff
path: root/x11/xorg-libs/patches/patch-ba
blob: fb02a9a3a8395c915f7da9eb74f5a7ae9c7d2fdc (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
$NetBSD: patch-ba,v 1.2 2005/04/16 03:48:47 reed Exp $

Index: extras/Xpm/lib/scan.c
===================================================================
RCS file: /cvs/OpenBSD/XF4/xc/extras/Xpm/lib/scan.c,v
retrieving revision 1.4
diff -u -r1.4 scan.c
--- scan.c	17 Nov 2004 20:22:05 -0000	1.4
+++ extras/Xpm/lib/scan.c	15 Feb 2005 21:34:05 -0000
@@ -621,8 +621,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;
 
@@ -632,6 +632,9 @@
     lbt = low_bits_table[depth];
     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;
Index: extras/Xpm/lib/create.c
===================================================================
RCS file: /cvs/OpenBSD/XF4/xc/extras/Xpm/lib/create.c,v
retrieving revision 1.7
diff -u -r1.7 create.c
--- create.c	19 Dec 2004 17:45:01 -0000	1.7
+++ extras/Xpm/lib/create.c	15 Feb 2005 21:39:53 -0000
@@ -1215,10 +1215,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;