diff options
Diffstat (limited to 'x11/xorg-libraries/files/patch-xpm-sec')
-rw-r--r-- | x11/xorg-libraries/files/patch-xpm-sec | 228 |
1 files changed, 0 insertions, 228 deletions
diff --git a/x11/xorg-libraries/files/patch-xpm-sec b/x11/xorg-libraries/files/patch-xpm-sec deleted file mode 100644 index fcb22f47be46..000000000000 --- a/x11/xorg-libraries/files/patch-xpm-sec +++ /dev/null @@ -1,228 +0,0 @@ -? extras/Xpm/lib/xorg681-xpm-secadd.patch -Index: extras/Xpm/lib/Attrib.c -=================================================================== -RCS file: /cvs/xorg/xc/extras/Xpm/lib/Attrib.c,v -retrieving revision 1.1.1.1.6.1 -diff -u -r1.1.1.1.6.1 Attrib.c ---- extras/Xpm/lib/Attrib.c 15 Sep 2004 15:47:39 -0000 1.1.1.1.6.1 -+++ extras/Xpm/lib/Attrib.c 5 Nov 2004 03:21:02 -0000 -@@ -52,7 +52,7 @@ - XpmColor **colorTable, **color; - int a; - -- if (ncolors >= SIZE_MAX / sizeof(XpmColor *)) -+ if (ncolors >= UINT_MAX / sizeof(XpmColor *)) - return XpmNoMemory; - - colorTable = (XpmColor **) XpmMalloc(ncolors * sizeof(XpmColor *)); -Index: extras/Xpm/lib/CrDatFrI.c -=================================================================== -RCS file: /cvs/xorg/xc/extras/Xpm/lib/CrDatFrI.c,v -retrieving revision 1.2.4.1 -diff -u -r1.2.4.1 CrDatFrI.c ---- extras/Xpm/lib/CrDatFrI.c 15 Sep 2004 15:47:39 -0000 1.2.4.1 -+++ extras/Xpm/lib/CrDatFrI.c 5 Nov 2004 03:21:02 -0000 -@@ -124,7 +124,7 @@ - */ - header_nlines = 1 + image->ncolors; - header_size = sizeof(char *) * header_nlines; -- if (header_size >= SIZE_MAX / sizeof(char *)) -+ if (header_size >= UINT_MAX / sizeof(char *)) - return (XpmNoMemory); - header = (char **) XpmCalloc(header_size, sizeof(char *)); - if (!header) -Index: extras/Xpm/lib/create.c -=================================================================== -RCS file: /cvs/xorg/xc/extras/Xpm/lib/create.c,v -retrieving revision 1.2.4.1 -diff -u -r1.2.4.1 create.c ---- extras/Xpm/lib/create.c 15 Sep 2004 15:47:39 -0000 1.2.4.1 -+++ extras/Xpm/lib/create.c 5 Nov 2004 03:21:03 -0000 -@@ -1,4 +1,4 @@ --/* $XdotOrg: xc/extras/Xpm/lib/create.c,v 1.2.4.1 2004/09/15 15:47:39 daniel Exp $ */ -+/* $XdotOrg: pre-CVS proposed fix for CESA-2004-003 alanc 7/25/2004 $ */ - /* - * Copyright (C) 1989-95 GROUPE BULL - * -@@ -817,7 +817,7 @@ - - ErrorStatus = XpmSuccess; - -- if (image->ncolors >= SIZE_MAX / sizeof(Pixel)) -+ if (image->ncolors >= UINT_MAX / sizeof(Pixel)) - return (XpmNoMemory); - - /* malloc pixels index tables */ -@@ -992,8 +992,10 @@ - return (XpmNoMemory); - - #if !defined(FOR_MSW) && !defined(AMIGA) -- if (height != 0 && (*image_return)->bytes_per_line >= SIZE_MAX / height) -+ if (height != 0 && (*image_return)->bytes_per_line >= SIZE_MAX / height) { -+ XDestroyImage(*image_return); - return XpmNoMemory; -+ } - /* now that bytes_per_line must have been set properly alloc data */ - (*image_return)->data = - (char *) XpmMalloc((*image_return)->bytes_per_line * height); -@@ -2061,8 +2063,8 @@ - xpmGetCmt(data, &colors_cmt); - - /* malloc pixels index tables */ -- if (ncolors >= SIZE_MAX / sizeof(Pixel)) -- return XpmNoMemory; -+ if (ncolors >= UINT_MAX / sizeof(Pixel)) -+ RETURN(XpmNoMemory); - - image_pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * ncolors); - if (!image_pixels) -@@ -2366,7 +2368,7 @@ - - /* array of pointers malloced by need */ - unsigned short *cidx[256]; -- int char1; -+ unsigned int char1; - - bzero((char *)cidx, 256 * sizeof(unsigned short *)); /* init */ - for (a = 0; a < ncolors; a++) { -Index: extras/Xpm/lib/hashtab.c -=================================================================== -RCS file: /cvs/xorg/xc/extras/Xpm/lib/hashtab.c,v -retrieving revision 1.1.1.1.6.1 -diff -u -r1.1.1.1.6.1 hashtab.c ---- extras/Xpm/lib/hashtab.c 15 Sep 2004 15:47:39 -0000 1.1.1.1.6.1 -+++ extras/Xpm/lib/hashtab.c 5 Nov 2004 03:21:03 -0000 -@@ -138,13 +138,13 @@ - unsigned int size = table->size; - xpmHashAtom *t, *p; - int i; -- int oldSize = size; -+ unsigned int oldSize = size; - - t = atomTable; - HASH_TABLE_GROWS - table->size = size; - table->limit = size / 3; -- if (size >= SIZE_MAX / sizeof(*atomTable)) -+ if (size >= UINT_MAX / sizeof(*atomTable)) - return (XpmNoMemory); - atomTable = (xpmHashAtom *) XpmMalloc(size * sizeof(*atomTable)); - if (!atomTable) -@@ -206,7 +206,7 @@ - table->size = INITIAL_HASH_SIZE; - table->limit = table->size / 3; - table->used = 0; -- if (table->size >= SIZE_MAX / sizeof(*atomTable)) -+ if (table->size >= UINT_MAX / sizeof(*atomTable)) - return (XpmNoMemory); - atomTable = (xpmHashAtom *) XpmMalloc(table->size * sizeof(*atomTable)); - if (!atomTable) -Index: extras/Xpm/lib/parse.c -=================================================================== -RCS file: /cvs/xorg/xc/extras/Xpm/lib/parse.c,v -retrieving revision 1.2.4.1 -diff -u -r1.2.4.1 parse.c ---- extras/Xpm/lib/parse.c 15 Sep 2004 15:47:39 -0000 1.2.4.1 -+++ extras/Xpm/lib/parse.c 5 Nov 2004 03:21:03 -0000 -@@ -1,4 +1,4 @@ --/* $XdotOrg: xc/extras/Xpm/lib/parse.c,v 1.2.4.1 2004/09/15 15:47:39 daniel Exp $ */ -+/* $XdotOrg: pre-CVS proposed fix for CESA-2004-003 alanc 7/25/2004 $ */ - /* - * Copyright (C) 1989-95 GROUPE BULL - * -@@ -205,7 +205,7 @@ - char **defaults; - int ErrorStatus; - -- if (ncolors >= SIZE_MAX / sizeof(XpmColor)) -+ if (ncolors >= UINT_MAX / sizeof(XpmColor)) - return (XpmNoMemory); - colorTable = (XpmColor *) XpmCalloc(ncolors, sizeof(XpmColor)); - if (!colorTable) -@@ -218,7 +218,7 @@ - /* - * read pixel value - */ -- if (cpp >= SIZE_MAX - 1) { -+ if (cpp >= UINT_MAX - 1) { - xpmFreeColorTable(colorTable, ncolors); - return (XpmNoMemory); - } -@@ -306,7 +306,7 @@ - /* - * read pixel value - */ -- if (cpp >= SIZE_MAX - 1) { -+ if (cpp >= UINT_MAX - 1) { - xpmFreeColorTable(colorTable, ncolors); - return (XpmNoMemory); - } -@@ -374,7 +374,7 @@ - unsigned int a, x, y; - - if ((height > 0 && width >= SIZE_MAX / height) || -- width * height >= SIZE_MAX / sizeof(unsigned int)) -+ width * height >= UINT_MAX / sizeof(unsigned int)) - return XpmNoMemory; - #ifndef FOR_MSW - iptr2 = (unsigned int *) XpmMalloc(sizeof(unsigned int) * width * height); -@@ -432,7 +432,7 @@ - - /* array of pointers malloced by need */ - unsigned short *cidx[256]; -- int char1; -+ unsigned int char1; - - bzero((char *)cidx, 256 * sizeof(unsigned short *)); /* init */ - for (a = 0; a < ncolors; a++) { -Index: extras/Xpm/lib/scan.c -=================================================================== -RCS file: /cvs/xorg/xc/extras/Xpm/lib/scan.c,v -retrieving revision 1.2.4.1 -diff -u -r1.2.4.1 scan.c ---- extras/Xpm/lib/scan.c 15 Sep 2004 15:47:39 -0000 1.2.4.1 -+++ extras/Xpm/lib/scan.c 5 Nov 2004 03:21:03 -0000 -@@ -234,14 +234,14 @@ - cpp = 0; - - if ((height > 0 && width >= SIZE_MAX / height) || -- width * height >= SIZE_MAX / sizeof(unsigned int)) -+ width * height >= UINT_MAX / sizeof(unsigned int)) - RETURN(XpmNoMemory); - pmap.pixelindex = - (unsigned int *) XpmCalloc(width * height, sizeof(unsigned int)); - if (!pmap.pixelindex) - RETURN(XpmNoMemory); - -- if (pmap.size >= SIZE_MAX / sizeof(Pixel)) -+ if (pmap.size >= UINT_MAX / sizeof(Pixel)) - RETURN(XpmNoMemory); - - pmap.pixels = (Pixel *) XpmMalloc(sizeof(Pixel) * pmap.size); -@@ -308,7 +308,7 @@ - * get rgb values and a string of char, and possibly a name for each - * color - */ -- if (pmap.ncolors >= SIZE_MAX / sizeof(XpmColor)) -+ if (pmap.ncolors >= UINT_MAX / sizeof(XpmColor)) - RETURN(XpmNoMemory); - colorTable = (XpmColor *) XpmCalloc(pmap.ncolors, sizeof(XpmColor)); - if (!colorTable) -@@ -368,7 +368,7 @@ - - /* first get a character string */ - a = 0; -- if (cpp >= SIZE_MAX - 1) -+ if (cpp >= UINT_MAX - 1) - return (XpmNoMemory); - if (!(s = color->string = (char *) XpmMalloc(cpp + 1))) - return (XpmNoMemory); -@@ -461,7 +461,7 @@ - } - - /* first get character strings and rgb values */ -- if (ncolors >= SIZE_MAX / sizeof(XColor) || cpp >= SIZE_MAX - 1) -+ if (ncolors >= UINT_MAX / sizeof(XColor) || cpp >= UINT_MAX - 1) - return (XpmNoMemory); - xcolors = (XColor *) XpmMalloc(sizeof(XColor) * ncolors); - if (!xcolors) |