Reviewed by john.
* Plugins.subproj/WebNetscapePluginPackage.m:
(-[WebNetscapePluginPackage initWithPath:]): make sure the file is at least 8 bytes long before calling memcmp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7453
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2004-09-03 Chris Blumenberg <cblu@apple.com>
+
+ Fixed: <rdar://problem/3782543> CrashTracer: ...87 crashes at com.apple.WebKit: -[WebNetscapePluginPackage initWithPath:] + 0x18c
+
+ Reviewed by john.
+
+ * Plugins.subproj/WebNetscapePluginPackage.m:
+ (-[WebNetscapePluginPackage initWithPath:]): make sure the file is at least 8 bytes long before calling memcmp
+
2004-09-03 Chris Blumenberg <cblu@apple.com>
Fixed:
[executableURL release];
NSData *data = [executableFile readDataOfLength:8];
[executableFile closeFile];
- if (!data) {
+ // Check the length of the data before calling memcmp. We think this fixes 3782543.
+ if (data == nil || [data length] < 8) {
[self release];
return nil;
}