Ticket #3996: zlib.diff

File zlib.diff, 1.2 KB (added by minskim@…, 19 years ago)

buffer overflow fix

  • Portfile

    diff -urN --exclude CVS zlib.orig/Portfile zlib/Portfile
    old new  
    33PortSystem 1.0
    44name            zlib
    55version         1.2.2
    6 revision        1
     6revision        2
    77categories      archivers
    88maintainers     landonf@opendarwin.org
    99description     zlib lossless data-compression library
     
    1919use_bzip2       yes
    2020checksums       md5 1b8aab042d40979e456194c468fd72c5
    2121
    22 patchfiles      patch-configure
     22patchfiles      patch-configure \
     23                patch-inftrees.c
    2324
    2425configure.args  --shared
    2526
  • files/patch-inftrees.c

    diff -urN --exclude CVS zlib.orig/files/patch-inftrees.c zlib/files/patch-inftrees.c
    old new  
     1--- inftrees.c.orig     2005-07-07 12:31:09.000000000 +0200
     2+++ inftrees.c
     3@@ -134,7 +134,7 @@ unsigned short FAR *work;
     4         left -= count[len];
     5         if (left < 0) return -1;        /* over-subscribed */
     6     }
     7-    if (left > 0 && (type == CODES || (codes - count[0] != 1)))
     8+    if (left > 0 && (type == CODES || max != 1))
     9         return -1;                      /* incomplete set */
     10 
     11     /* generate offsets into symbol table for each length for sorting */