Title: [170692] trunk/Source/WebKit2
Revision
170692
Author
timothy_hor...@apple.com
Date
2014-07-01 20:06:15 -0700 (Tue, 01 Jul 2014)

Log Message

Handle invalid data more gracefully.

Reviewed by Anders Carlsson.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeFormData):
(WebKit::decodeBackForwardTreeNode):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (170691 => 170692)


--- trunk/Source/WebKit2/ChangeLog	2014-07-02 02:50:09 UTC (rev 170691)
+++ trunk/Source/WebKit2/ChangeLog	2014-07-02 03:06:15 UTC (rev 170692)
@@ -1,3 +1,13 @@
+2014-07-01  Tim Horton  <timothy_hor...@apple.com>
+
+        Handle invalid data more gracefully.
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/mac/LegacySessionStateCoding.cpp:
+        (WebKit::decodeFormData):
+        (WebKit::decodeBackForwardTreeNode):
+
 2014-07-01  Mark Rowe  <mr...@apple.com>
 
         Add a missing return statement in WKPageCopySessionState.

Modified: trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp (170691 => 170692)


--- trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp	2014-07-02 02:50:09 UTC (rev 170691)
+++ trunk/Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.cpp	2014-07-02 03:06:15 UTC (rev 170692)
@@ -825,6 +825,9 @@
         HTTPBody::Element formDataElement;
         decodeFormDataElement(decoder, formDataElement);
 
+        if (!decoder.isValid())
+            return;
+
         formData.elements.append(std::move(formDataElement));
     }
 
@@ -846,6 +849,10 @@
         decoder >> childFrameState.urlString;
 
         decodeBackForwardTreeNode(decoder, childFrameState);
+
+        if (!decoder.isValid())
+            return;
+
         frameState.children.append(std::move(childFrameState));
     }
 
@@ -858,6 +865,9 @@
         String state;
         decoder >> state;
 
+        if (!decoder.isValid())
+            return;
+
         frameState.documentState.append(std::move(state));
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to