Bug 86505 - [WK2] Crash when dropping a reference to a non-existing file
Summary: [WK2] Crash when dropping a reference to a non-existing file
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-05-15 11:57 PDT by Alexey Proskuryakov
Modified: 2012-05-15 12:52 PDT (History)
1 user (show)

See Also:


Attachments
proposed fix (1.81 KB, patch)
2012-05-15 12:01 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2012-05-15 11:57:28 PDT
Drag data can contain non-existing file paths (an application you're dragging form has full control of that). We should not crash.

<rdar://problem/11402084>
Comment 1 Alexey Proskuryakov 2012-05-15 12:01:09 PDT
Created attachment 142020 [details]
proposed fix
Comment 2 Darin Adler 2012-05-15 12:04:07 PDT
Comment on attachment 142020 [details]
proposed fix

View in context: https://bugs.webkit.org/attachment.cgi?id=142020&action=review

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2191
> +            RefPtr<SandboxExtension> extension = SandboxExtension::create(sandboxExtensionsHandleArray[i]);
> +            if (extension)
> +                m_pendingDropExtensionsForFileUpload.append(extension);

I would have put the definition inside the if statement.
Comment 3 Alexey Proskuryakov 2012-05-15 12:52:28 PDT
Committed <http://trac.webkit.org/changeset/117124>.