gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r2205 - Extractor/src/main


From: grothoff
Subject: [GNUnet-SVN] r2205 - Extractor/src/main
Date: Thu, 20 Oct 2005 23:11:29 -0700 (PDT)

Author: grothoff
Date: 2005-10-20 23:11:27 -0700 (Thu, 20 Oct 2005)
New Revision: 2205

Modified:
   Extractor/src/main/extractor.c
Log:
fix

Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c      2005-10-17 18:41:54 UTC (rev 2204)
+++ Extractor/src/main/extractor.c      2005-10-21 06:11:27 UTC (rev 2205)
@@ -660,7 +660,7 @@
   dsize = 0;
 #if HAVE_ZLIB
   /* try gzip decompression first */
-  if ( (size >= 11) &&
+  if ( (size >= 12) &&
        (data[0] == 0x1f) &&
        (data[1] == 0x8b) &&
        (data[2] == 0x08) ) {
@@ -670,9 +670,9 @@
      */
     unsigned gzip_header_length = 10;
 
-    if(data[3] & 0x4) /* FEXTRA  set */
+    if (data[3] & 0x4) /* FEXTRA  set */
       gzip_header_length += 2 + (unsigned) (data[10] & 0xff)
-                              + (((unsigned) (data[10] & 0xff)) * 256);
+                              + (((unsigned) (data[11] & 0xff)) * 256);
 
     if(data[3] & 0x8) /* FNAME set */
     {
@@ -688,7 +688,7 @@
         if('\0' == *cptr)
           break;
 
-        cptr += 1;
+        cptr++;
       }
       gzip_header_length = (cptr - data) + 1;
     }
@@ -718,7 +718,7 @@
     memset(&strm,
           0,
           sizeof(z_stream));
-#ifdef ZLIB_VERNUM
+#ifdef ZLIB_VERNUM 
     gzip_header_length = 0;
 #endif
     if (size > gzip_header_length) {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]