Author: branden
Date: 2004-09-18 12:44:13 -0500 (Sat, 18 Sep 2004)
New Revision: 1827

Modified:
   branches/4.1.0/woody/debian/patches/076_SECURITY_libXpm_vulnerabilities.diff
Log:
Fix missing #endif in security patch.


Modified: 
branches/4.1.0/woody/debian/patches/076_SECURITY_libXpm_vulnerabilities.diff
===================================================================
--- 
branches/4.1.0/woody/debian/patches/076_SECURITY_libXpm_vulnerabilities.diff    
    2004-09-18 08:21:17 UTC (rev 1826)
+++ 
branches/4.1.0/woody/debian/patches/076_SECURITY_libXpm_vulnerabilities.diff    
    2004-09-18 17:44:13 UTC (rev 1827)
@@ -63,8 +63,8 @@
 This patch by Matthieu Herrb.
 
 diff -urN xc/extras/Xpm~/lib/Attrib.c xc/extras/Xpm/lib/Attrib.c
---- xc/extras/Xpm~/lib/Attrib.c        1999-01-11 08:23:09.000000000 -0500
-+++ xc/extras/Xpm/lib/Attrib.c 2004-09-15 16:30:40.000000000 -0500
+--- xc/extras/Xpm~/lib/Attrib.c        2004-09-18 12:39:38.000000000 -0500
++++ xc/extras/Xpm/lib/Attrib.c 2004-09-18 12:42:05.000000000 -0500
 @@ -35,7 +35,7 @@
  #include "XpmI.h"
  
@@ -92,8 +92,8 @@
      if (!colorTable) {
        *oldct = NULL;
 diff -urN xc/extras/Xpm~/lib/CrDatFrI.c xc/extras/Xpm/lib/CrDatFrI.c
---- xc/extras/Xpm~/lib/CrDatFrI.c      1999-01-11 08:23:09.000000000 -0500
-+++ xc/extras/Xpm/lib/CrDatFrI.c       2004-09-15 16:30:40.000000000 -0500
+--- xc/extras/Xpm~/lib/CrDatFrI.c      2004-09-18 12:39:38.000000000 -0500
++++ xc/extras/Xpm/lib/CrDatFrI.c       2004-09-18 12:42:05.000000000 -0500
 @@ -123,6 +123,8 @@
       */
      header_nlines = 1 + image->ncolors;
@@ -104,8 +104,8 @@
      if (!header)
        return (XpmNoMemory);
 diff -urN xc/extras/Xpm~/lib/WrFFrI.c xc/extras/Xpm/lib/WrFFrI.c
---- xc/extras/Xpm~/lib/WrFFrI.c        1999-01-11 08:23:10.000000000 -0500
-+++ xc/extras/Xpm/lib/WrFFrI.c 2004-09-15 16:30:40.000000000 -0500
+--- xc/extras/Xpm~/lib/WrFFrI.c        2004-09-18 12:39:38.000000000 -0500
++++ xc/extras/Xpm/lib/WrFFrI.c 2004-09-18 12:42:05.000000000 -0500
 @@ -247,6 +247,8 @@
      unsigned int x, y, h;
  
@@ -116,8 +116,8 @@
      if (!buf)
        return (XpmNoMemory);
 diff -urN xc/extras/Xpm~/lib/XpmI.h xc/extras/Xpm/lib/XpmI.h
---- xc/extras/Xpm~/lib/XpmI.h  2000-09-26 10:56:42.000000000 -0500
-+++ xc/extras/Xpm/lib/XpmI.h   2004-09-15 16:30:40.000000000 -0500
+--- xc/extras/Xpm~/lib/XpmI.h  2004-09-18 12:39:38.000000000 -0500
++++ xc/extras/Xpm/lib/XpmI.h   2004-09-18 12:42:05.000000000 -0500
 @@ -116,6 +116,18 @@
                boundCheckingCalloc((long)(nelem),(long) (elsize))
  #endif
@@ -151,8 +151,8 @@
  }      xpmHashTable;
  
 diff -urN xc/extras/Xpm~/lib/create.c xc/extras/Xpm/lib/create.c
---- xc/extras/Xpm~/lib/create.c        1999-01-11 08:23:10.000000000 -0500
-+++ xc/extras/Xpm/lib/create.c 2004-09-15 16:30:40.000000000 -0500
+--- xc/extras/Xpm~/lib/create.c        2004-09-18 12:39:46.000000000 -0500
++++ xc/extras/Xpm/lib/create.c 2004-09-18 12:42:05.000000000 -0500
 @@ -1,3 +1,4 @@
 +/* $XdotOrg: pre-CVS proposed fix for CESA-2004-003 alanc 7/25/2004 $ */
  /*
@@ -208,8 +208,8 @@
            if (USE_HASHTABLE) {
                xpmHashAtom *slot;
 diff -urN xc/extras/Xpm~/lib/data.c xc/extras/Xpm/lib/data.c
---- xc/extras/Xpm~/lib/data.c  2000-02-23 15:28:14.000000000 -0500
-+++ xc/extras/Xpm/lib/data.c   2004-09-15 16:30:40.000000000 -0500
+--- xc/extras/Xpm~/lib/data.c  2004-09-18 12:39:46.000000000 -0500
++++ xc/extras/Xpm/lib/data.c   2004-09-18 12:42:05.000000000 -0500
 @@ -374,7 +374,7 @@
  {
      if (!data->type)
@@ -220,8 +220,8 @@
        strncpy(*cmt, data->Comment, data->CommentLength);
        (*cmt)[data->CommentLength] = '\0';
 diff -urN xc/extras/Xpm~/lib/hashtab.c xc/extras/Xpm/lib/hashtab.c
---- xc/extras/Xpm~/lib/hashtab.c       1999-01-11 08:23:11.000000000 -0500
-+++ xc/extras/Xpm/lib/hashtab.c        2004-09-15 16:30:40.000000000 -0500
+--- xc/extras/Xpm~/lib/hashtab.c       2004-09-18 12:39:46.000000000 -0500
++++ xc/extras/Xpm/lib/hashtab.c        2004-09-18 12:42:05.000000000 -0500
 @@ -135,7 +135,7 @@
      xpmHashTable *table;
  {
@@ -250,14 +250,14 @@
      if (!atomTable)
        return (XpmNoMemory);
 diff -urN xc/extras/Xpm~/lib/parse.c xc/extras/Xpm/lib/parse.c
---- xc/extras/Xpm~/lib/parse.c 2000-09-26 10:56:43.000000000 -0500
-+++ xc/extras/Xpm/lib/parse.c  2004-09-16 15:31:32.000000000 -0500
+--- xc/extras/Xpm~/lib/parse.c 2004-09-18 12:39:46.000000000 -0500
++++ xc/extras/Xpm/lib/parse.c  2004-09-18 12:42:05.000000000 -0500
 @@ -1,3 +1,4 @@
 +/* $XdotOrg: pre-CVS proposed fix for CESA-2004-003 alanc 7/25/2004 $ */
  /*
   * Copyright (C) 1989-95 GROUPE BULL
   *
-@@ -43,6 +44,23 @@
+@@ -43,6 +44,24 @@
  #include <ctype.h>
  #include <string.h>
  
@@ -277,11 +277,12 @@
 +      if (strlen(src) < (dstsize)) \
 +          strcpy(dst, src); \
 +      else return (XpmFileInvalid); }
++#endif
 +
  LFUNC(ParsePixels, int, (xpmData *data, unsigned int width,
                         unsigned int height, unsigned int ncolors,
                         unsigned int cpp, XpmColor *colorTable,
-@@ -65,7 +83,7 @@
+@@ -65,7 +84,7 @@
      unsigned int *extensions;
  {
      unsigned int l;
@@ -290,7 +291,7 @@
  
      if (!data->format) {              /* XPM 2 or 3 */
  
-@@ -174,10 +192,10 @@
+@@ -174,10 +193,10 @@
      XpmColor **colorTablePtr;
      xpmHashTable *hashtable;
  {
@@ -303,7 +304,7 @@
      char curbuf[BUFSIZ];              /* current buffer */
      char **sptr, *s;
      XpmColor *color;
-@@ -185,6 +203,8 @@
+@@ -185,6 +204,8 @@
      char **defaults;
      int ErrorStatus;
  
@@ -312,7 +313,7 @@
      colorTable = (XpmColor *) XpmCalloc(ncolors, sizeof(XpmColor));
      if (!colorTable)
        return (XpmNoMemory);
-@@ -196,6 +216,10 @@
+@@ -196,6 +217,10 @@
            /*
             * read pixel value
             */
@@ -323,7 +324,7 @@
            color->string = (char *) XpmMalloc(cpp + 1);
            if (!color->string) {
                xpmFreeColorTable(colorTable, ncolors);
-@@ -233,13 +257,14 @@
+@@ -233,13 +258,14 @@
                }
                if (!lastwaskey && key < NKEYS) {       /* open new key */
                    if (curkey) {       /* flush string */
@@ -340,7 +341,7 @@
                    }
                    curkey = key + 1;   /* set new key  */
                    *curbuf = '\0';     /* reset curbuf */
-@@ -250,9 +275,9 @@
+@@ -250,9 +276,9 @@
                        return (XpmFileInvalid);
                    }
                    if (!lastwaskey)
@@ -352,7 +353,7 @@
                    lastwaskey = 0;
                }
            }
-@@ -260,12 +285,13 @@
+@@ -260,12 +286,13 @@
                xpmFreeColorTable(colorTable, ncolors);
                return (XpmFileInvalid);
            }
@@ -368,7 +369,7 @@
        }
      } else {                          /* XPM 1 */
        /* get to the beginning of the first string */
-@@ -278,6 +304,10 @@
+@@ -278,6 +305,10 @@
            /*
             * read pixel value
             */
@@ -379,7 +380,7 @@
            color->string = (char *) XpmMalloc(cpp + 1);
            if (!color->string) {
                xpmFreeColorTable(colorTable, ncolors);
-@@ -306,16 +336,17 @@
+@@ -306,16 +337,17 @@
            *curbuf = '\0';             /* init curbuf */
            while (l = xpmNextWord(data, buf, BUFSIZ)) {
                if (*curbuf != '\0')
@@ -401,7 +402,7 @@
            color->c_color = s;
            *curbuf = '\0';             /* reset curbuf */
            if (a < ncolors - 1)
-@@ -340,6 +371,9 @@
+@@ -340,6 +372,9 @@
      unsigned int *iptr, *iptr2;
      unsigned int a, x, y;
  
@@ -411,7 +412,7 @@
  #ifndef FOR_MSW
      iptr2 = (unsigned int *) XpmMalloc(sizeof(unsigned int) * width * height);
  #else
-@@ -363,6 +397,9 @@
+@@ -363,6 +398,9 @@
        {
            unsigned short colidx[256];
  
@@ -421,7 +422,7 @@
            bzero((char *)colidx, 256 * sizeof(short));
            for (a = 0; a < ncolors; a++)
                colidx[(unsigned char)colorTable[a].string[0]] = a + 1;
-@@ -441,6 +478,9 @@
+@@ -441,6 +479,9 @@
            char *s;
            char buf[BUFSIZ];
  
@@ -432,8 +433,8 @@
            if (USE_HASHTABLE) {
                xpmHashAtom *slot;
 diff -urN xc/extras/Xpm~/lib/scan.c xc/extras/Xpm/lib/scan.c
---- xc/extras/Xpm~/lib/scan.c  1999-01-11 08:23:11.000000000 -0500
-+++ xc/extras/Xpm/lib/scan.c   2004-09-15 16:30:40.000000000 -0500
+--- xc/extras/Xpm~/lib/scan.c  2004-09-18 12:39:46.000000000 -0500
++++ xc/extras/Xpm/lib/scan.c   2004-09-18 12:42:05.000000000 -0500
 @@ -103,7 +103,8 @@
  LFUNC(ScanTransparentColor, int, (XpmColor *color, unsigned int cpp,
                                  XpmAttributes *attributes));
@@ -500,8 +501,8 @@
      if (!xcolors)
        return (XpmNoMemory);
 diff -urN xc/lib/Xpm~/Imakefile xc/lib/Xpm/Imakefile
---- xc/lib/Xpm~/Imakefile      2000-09-19 07:46:06.000000000 -0500
-+++ xc/lib/Xpm/Imakefile       2004-09-15 16:30:40.000000000 -0500
+--- xc/lib/Xpm~/Imakefile      2004-09-18 12:39:46.000000000 -0500
++++ xc/lib/Xpm/Imakefile       2004-09-18 12:42:05.000000000 -0500
 @@ -42,11 +42,16 @@
  SPRINTFDEF = -DVOID_SPRINTF
  #endif

Reply via email to