Title: [152357] trunk/Source/WebKit2
Revision
152357
Author
[email protected]
Date
2013-07-03 09:12:40 -0700 (Wed, 03 Jul 2013)

Log Message

Output arguments used in IPC calls should be returned initialised
https://bugs.webkit.org/show_bug.cgi?id=118354

Patch by Simon Pena <[email protected]> on 2013-07-03
Reviewed by Anders Carlsson.

When Download::shouldDecodeSourceDataOfMIMEType and Download::retrieveDestinationWithSuggestedFilename
call DownloadProxy::shouldDecodeSourceDataOfMIMEType and DownloadProxy::decideDestinationWithSuggestedFilename
through IPC, they assume the output arguments result and allowOverwrite have
been initialised.

This patch initialises these arguments also in the unlikely event that a
m_webContext is not available.

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (152356 => 152357)


--- trunk/Source/WebKit2/ChangeLog	2013-07-03 15:38:49 UTC (rev 152356)
+++ trunk/Source/WebKit2/ChangeLog	2013-07-03 16:12:40 UTC (rev 152357)
@@ -1,3 +1,22 @@
+2013-07-03  Simon Pena  <[email protected]>
+
+        Output arguments used in IPC calls should be returned initialised
+        https://bugs.webkit.org/show_bug.cgi?id=118354
+
+        Reviewed by Anders Carlsson.
+
+        When Download::shouldDecodeSourceDataOfMIMEType and Download::retrieveDestinationWithSuggestedFilename
+        call DownloadProxy::shouldDecodeSourceDataOfMIMEType and DownloadProxy::decideDestinationWithSuggestedFilename
+        through IPC, they assume the output arguments result and allowOverwrite have
+        been initialised.
+
+        This patch initialises these arguments also in the unlikely event that a
+        m_webContext is not available.
+
+        * UIProcess/Downloads/DownloadProxy.cpp:
+        (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
+        (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
+
 2013-07-03  Sergio Villar Senin  <[email protected]>
 
         [WK2][GTK] Invalid ASSERTs in WebResources loading code

Modified: trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp (152356 => 152357)


--- trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp	2013-07-03 15:38:49 UTC (rev 152356)
+++ trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp	2013-07-03 16:12:40 UTC (rev 152357)
@@ -135,6 +135,8 @@
 
 void DownloadProxy::shouldDecodeSourceDataOfMIMEType(const String& mimeType, bool& result)
 {
+    result = false;
+
     if (!m_webContext)
         return;
 
@@ -143,6 +145,8 @@
 
 void DownloadProxy::decideDestinationWithSuggestedFilename(const String& filename, String& destination, bool& allowOverwrite, SandboxExtension::Handle& sandboxExtensionHandle)
 {
+    allowOverwrite = false;
+
     if (!m_webContext)
         return;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to