Bug 44564

Summary: Null dereference possible in WebView::canShowMIMEType
Product: WebKit Reporter: Ada Chan <adachan>
Component: WebKit Misc.Assignee: Ada Chan <adachan>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch sfalken: review+

Ada Chan
Reported 2010-08-24 16:46:15 PDT
This is a snippet from WebView::canShowMIMEType(): *canShow = MIMETypeRegistry::isSupportedImageMIMEType(mimeTypeStr) || MIMETypeRegistry::isSupportedNonImageMIMEType(mimeTypeStr) || (m_page && m_page->pluginData()->supportsMimeType(mimeTypeStr)) || shouldUseEmbeddedView(mimeTypeStr); m_page->pluginData() can return null if plugins are disabled on the user's system and we'd crash in that case. We should null check m_page->pluginData().
Attachments
Patch (1.27 KB, patch)
2010-08-24 17:05 PDT, Ada Chan
sfalken: review+
Ada Chan
Comment 1 2010-08-24 16:47:24 PDT
Ada Chan
Comment 2 2010-08-24 17:05:22 PDT
Created attachment 65346 [details] Patch Null check return value of m_page->pluginData() before accessing it.
Ada Chan
Comment 3 2010-08-24 17:10:23 PDT
Committed fix: r65952
Note You need to log in before you can comment on or make changes to this bug.