Changeset 98970 in webkit
- Timestamp:
- Nov 1, 2011, 9:28:18 AM (13 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r98769 r98970 1 2011-11-01 Darin Adler <darin@apple.com> 2 3 Crash in PDF code when script has illegal UTF-8 or UTF-16 sequences 4 https://bugs.webkit.org/show_bug.cgi?id=71289 5 6 Reviewed by Dan Bernstein. 7 8 Just adding a null check. I don't have access to an actual PDF with 9 this problem but crashes from the field indicate they exist. 10 11 * WebView/WebPDFDocumentExtras.mm: 12 (allScriptsInPDFDocument): Skip the code to add the script text 13 to an array when the script is null. 14 1 15 2011-10-28 John Sullivan <sullivan@apple.com> 2 16 -
trunk/Source/WebKit/mac/WebView/WebPDFDocumentExtras.mm
r95901 r98970 90 90 return scripts; 91 91 92 // The names are ar ibtrary. We are only interested in the values.92 // The names are arbitrary. We are only interested in the values. 93 93 Vector<CGPDFObjectRef> objects; 94 94 getAllValuesInPDFNameTree(javaScriptNameTree, objects); … … 126 126 NSStringEncoding encoding = (length > 1 && bytes[0] == 0xFE && bytes[1] == 0xFF) ? NSUnicodeStringEncoding : NSUTF8StringEncoding; 127 127 NSString *script = [[NSString alloc] initWithBytes:bytes length:length encoding:encoding]; 128 if (!script) 129 continue; 130 128 131 [scripts addObject:script]; 129 132 [script release];
Note:
See TracChangeset
for help on using the changeset viewer.