Title: [188115] trunk/Source/WebKit2
Revision
188115
Author
bda...@apple.com
Date
2015-08-06 22:09:07 -0700 (Thu, 06 Aug 2015)

Log Message

TextIndicator can have stale contentImage data and crash
https://bugs.webkit.org/show_bug.cgi?id=147770
-and corresponding-
rdar://problem/22181735

Reviewed by Tim Horton.

If there is no contentImage or contentImageWithHighlight, set them to 
nullptr.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::decode):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (188114 => 188115)


--- trunk/Source/WebKit2/ChangeLog	2015-08-07 04:21:01 UTC (rev 188114)
+++ trunk/Source/WebKit2/ChangeLog	2015-08-07 05:09:07 UTC (rev 188115)
@@ -1,3 +1,17 @@
+2015-08-06  Beth Dakin  <bda...@apple.com>
+
+        TextIndicator can have stale contentImage data and crash
+        https://bugs.webkit.org/show_bug.cgi?id=147770
+        -and corresponding-
+        rdar://problem/22181735
+
+        Reviewed by Tim Horton.
+
+        If there is no contentImage or contentImageWithHighlight, set them to 
+        nullptr.
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder<TextIndicatorData>::decode):
+
 2015-08-06  Dan Bernstein  <m...@apple.com>
 
         Fixed all the builds after trying to fix the non-HAVE(LINK_PREVIEW) build.

Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (188114 => 188115)


--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp	2015-08-07 04:21:01 UTC (rev 188114)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp	2015-08-07 05:09:07 UTC (rev 188115)
@@ -2165,12 +2165,16 @@
     bool hasImage;
     if (!decoder.decode(hasImage))
         return false;
+    if (!hasImage)
+        textIndicatorData.contentImage = nullptr;
     if (hasImage && !decodeImage(decoder, textIndicatorData.contentImage))
         return false;
 
     bool hasImageWithHighlight;
     if (!decoder.decode(hasImageWithHighlight))
         return false;
+    if (!hasImageWithHighlight)
+        textIndicatorData.contentImageWithHighlight = nullptr;
     if (hasImageWithHighlight && !decodeImage(decoder, textIndicatorData.contentImageWithHighlight))
         return false;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to