Magellan Linux

Contents of /trunk/xorg-old/patches-6.8.2-r10/9930_all_6.8.0-xpm-secfix-CAN-2005-0605.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 167 - (show annotations) (download)
Tue May 8 20:58:51 2007 UTC (17 years ago) by niro
File size: 1493 byte(s)
-import

1 Index: scan.c
2 ===================================================================
3 RCS file: /cvs/OpenBSD/XF4/xc/extras/Xpm/lib/scan.c,v
4 retrieving revision 1.4
5 diff -u -r1.4 scan.c
6 --- xc.orig/extras/Xpm/lib/scan.c 17 Nov 2004 20:22:05 -0000 1.4
7 +++ xc/extras/Xpm/lib/scan.c 15 Feb 2005 21:34:05 -0000
8 @@ -621,8 +621,8 @@
9 char *dst;
10 unsigned int *iptr;
11 char *data;
12 - unsigned int x, y, i;
13 - int bits, depth, ibu, ibpp, offset;
14 + unsigned int x, y;
15 + int bits, depth, ibu, ibpp, offset, i;
16 unsigned long lbt;
17 Pixel pixel, px;
18
19 @@ -632,6 +632,9 @@
20 lbt = low_bits_table[depth];
21 ibpp = image->bits_per_pixel;
22 offset = image->xoffset;
23 +
24 + if (image->bitmap_unit < 0)
25 + return (XpmNoMemory);
26
27 if ((image->bits_per_pixel | image->depth) == 1) {
28 ibu = image->bitmap_unit;
29 Index: create.c
30 ===================================================================
31 RCS file: /cvs/OpenBSD/XF4/xc/extras/Xpm/lib/create.c,v
32 retrieving revision 1.7
33 diff -u -r1.7 create.c
34 --- xc.orig/extras/Xpm/lib/create.c 19 Dec 2004 17:45:01 -0000 1.7
35 +++ xc/extras/Xpm/lib/create.c 15 Feb 2005 21:39:53 -0000
36 @@ -1215,10 +1215,10 @@
37 register char *src;
38 register char *dst;
39 register unsigned int *iptr;
40 - register unsigned int x, y, i;
41 + register unsigned int x, y;
42 register char *data;
43 Pixel pixel, px;
44 - int nbytes, depth, ibu, ibpp;
45 + int nbytes, depth, ibu, ibpp, i;
46
47 data = image->data;
48 iptr = pixelindex;