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

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:43:15 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 60936a434936347e8e88ceff6ca3772f97b4fbb8
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue May 27 21:50:33 2003 +0000

    	Fixed: 3270013 - Exception raised when visiting http://www.shutterfly.com/favicon.ico
    
            Reviewed by john.
    
            * WebCoreSupport.subproj/WebImageRendererFactory.m:
            (-[WebImageRendererFactory imageRendererWithBytes:length:MIMEType:]): return nil if the image has no representations
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4428 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index a7cf37b..350fea7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,14 @@
 2003-05-27  Chris Blumenberg  <cblu at apple.com>
 
+	Fixed: 3270013 - Exception raised when visiting http://www.shutterfly.com/favicon.ico
+
+        Reviewed by john.
+
+        * WebCoreSupport.subproj/WebImageRendererFactory.m:
+        (-[WebImageRendererFactory imageRendererWithBytes:length:MIMEType:]): return nil if the image has no representations
+
+2003-05-27  Chris Blumenberg  <cblu at apple.com>
+
         Fixed: 3242864 - repro assertion failure in WebIconDatabase.m for www.shutterfly.com
 
         Reviewed by john.
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m b/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
index 2afb11a..795b66e 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRendererFactory.m
@@ -68,13 +68,21 @@
     //NSData *data = [[NSData alloc] initWithBytesNoCopy:(void *)bytes length:length freeWhenDone:NO];
     NSData *data = [[NSData alloc] initWithBytes:(void *)bytes length:length];
     WebImageRenderer *imageRenderer = [[WebImageRenderer alloc] initWithData:data MIMEType:MIMEType];
-    [imageRenderer setScalesWhenResized:NO];
+    [data release];
+    
     NSArray *reps = [imageRenderer representations];
-    NSImageRep *rep = [reps objectAtIndex:0];
+    if ([reps count] == 0) {
+        [self release];
+        return nil;
+    }
+
     // Force the image to use the pixel size and ignore the dpi.
+    [imageRenderer setScalesWhenResized:NO];
+    NSImageRep *rep = [reps objectAtIndex:0];
     [rep setSize:NSMakeSize([rep pixelsWide], [rep pixelsHigh])];
-    [data release];
+    
     [imageRenderer setFlipped:YES];
+    
     return [imageRenderer autorelease];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list