[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:57:23 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f7b6b22188743285c3d80b970009c1faaab8607f
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 6 01:21:54 2002 +0000

    	- changed our MacBinary decoding to not pay any attention to the comment
    
    	Before we would "fail to decode" if the comment was truncated, now we just
    	don't worry about it.
    
            * Downloads.subproj/WebMacBinaryDecoder.h: Remove _commentLength and _commentEnd.
            * Downloads.subproj/WebMacBinaryDecoder.m:
            (-[WebMacBinaryDecoder decodeData:dataForkData:resourceForkData:]): Remove code
    	to get _commentLength and code to compute _commentEnd.
            (-[WebMacBinaryDecoder finishDecoding]): Check offset against the resource fork
    	end rather than the comment end to see if we got enough data.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2568 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 9262e6f..75965f8 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2002-11-05  Darin Adler  <darin at apple.com>
+
+	- changed our MacBinary decoding to not pay any attention to the comment
+
+	Before we would "fail to decode" if the comment was truncated, now we just
+	don't worry about it.
+
+        * Downloads.subproj/WebMacBinaryDecoder.h: Remove _commentLength and _commentEnd.
+        * Downloads.subproj/WebMacBinaryDecoder.m:
+        (-[WebMacBinaryDecoder decodeData:dataForkData:resourceForkData:]): Remove code
+	to get _commentLength and code to compute _commentEnd.
+        (-[WebMacBinaryDecoder finishDecoding]): Check offset against the resource fork
+	end rather than the comment end to see if we got enough data.
+
 2002-11-05  John Sullivan  <sullivan at apple.com>
 
         * Resources/url_icon.tiff:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 9262e6f..75965f8 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-11-05  Darin Adler  <darin at apple.com>
+
+	- changed our MacBinary decoding to not pay any attention to the comment
+
+	Before we would "fail to decode" if the comment was truncated, now we just
+	don't worry about it.
+
+        * Downloads.subproj/WebMacBinaryDecoder.h: Remove _commentLength and _commentEnd.
+        * Downloads.subproj/WebMacBinaryDecoder.m:
+        (-[WebMacBinaryDecoder decodeData:dataForkData:resourceForkData:]): Remove code
+	to get _commentLength and code to compute _commentEnd.
+        (-[WebMacBinaryDecoder finishDecoding]): Check offset against the resource fork
+	end rather than the comment end to see if we got enough data.
+
 2002-11-05  John Sullivan  <sullivan at apple.com>
 
         * Resources/url_icon.tiff:
diff --git a/WebKit/Downloads.subproj/WebMacBinaryDecoder.h b/WebKit/Downloads.subproj/WebMacBinaryDecoder.h
index c28c990..b2dd751 100644
--- a/WebKit/Downloads.subproj/WebMacBinaryDecoder.h
+++ b/WebKit/Downloads.subproj/WebMacBinaryDecoder.h
@@ -15,12 +15,9 @@
     unsigned char _name[64];
     int _dataForkLength;
     int _resourceForkLength;
-    int _commentLength;
     u_int32_t _creationDate;
     u_int32_t _modificationDate;
     OSType _fileType;
     OSType _fileCreator;
-
-    int _commentEnd;
 }
 @end
diff --git a/WebKit/Downloads.subproj/WebMacBinaryDecoder.m b/WebKit/Downloads.subproj/WebMacBinaryDecoder.m
index 1e105bc..8282680 100644
--- a/WebKit/Downloads.subproj/WebMacBinaryDecoder.m
+++ b/WebKit/Downloads.subproj/WebMacBinaryDecoder.m
@@ -15,14 +15,6 @@
 
 #define HEADER_SIZE 128
 
-enum {
-    readingHeader,
-    readingDataFork,
-    skippingToResourceFork,
-    readingResourceFork,
-    finished
-};
-
 @implementation WebMacBinaryDecoder
 
 // Returns YES if the decoder can decode headerData, NO otherwise.
@@ -77,22 +69,20 @@ enum {
         const u_int8_t *header = [data bytes];
         
         ASSERT(header[1] < sizeof(_name));
-        memcpy(_name, header + 1, header[1] + 1);	// Copy the name
+        memcpy(_name, header + 1, header[1] + 1);
+        
         _fileType = (((((header[65] << 8) | header[66]) << 8) | header[67]) << 8) | header[68];
         _fileCreator = (((((header[69] << 8) | header[70]) << 8) | header[71]) << 8) | header[72];
         _dataForkLength = (((((header[83] << 8) | header[84]) << 8) | header[85]) << 8) | header[86];
         _resourceForkLength = (((((header[87] << 8) | header[88]) << 8) | header[89]) << 8) | header[90];
         _creationDate = (((((header[91] << 8) | header[92]) << 8) | header[93]) << 8) | header[94];
         _modificationDate = (((((header[95] << 8) | header[96]) << 8) | header[97]) << 8) | header[98];
-        _commentLength = (header[99] << 8) | header[100];
     }
     
     int dataForkStart = HEADER_SIZE;
     int dataForkEnd = dataForkStart + _dataForkLength;
     int resourceForkStart = (dataForkEnd + 0x7F) & ~0x7F;
     int resourceForkEnd = resourceForkStart + _resourceForkLength;
-    int commentStart = (resourceForkEnd + 0x7F) & ~0x7F;
-    _commentEnd = commentStart + _commentLength;
 
     // Check for a piece of available data fork.
     if (_dataForkLength && _offset < dataForkEnd && _offset + dataLength > dataForkStart) {
@@ -118,7 +108,11 @@ enum {
 // Returns YES if decoding successfully finished, NO otherwise.
 - (BOOL)finishDecoding
 {
-    return _offset >= _commentEnd;
+    int dataForkStart = HEADER_SIZE;
+    int dataForkEnd = dataForkStart + _dataForkLength;
+    int resourceForkStart = (dataForkEnd + 0x7F) & ~0x7F;
+    int resourceForkEnd = resourceForkStart + _resourceForkLength;
+    return _offset >= resourceForkEnd;
 }
 
 // Returns a dictionary of 4 file attributes. The attributes (as defined in NSFileManager.h) are:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list