Title: [235416] trunk
- Revision
- 235416
- Author
- mmaxfi...@apple.com
- Date
- 2018-08-27 17:37:17 -0700 (Mon, 27 Aug 2018)
Log Message
Null pointer deref in WidthIterator
https://bugs.webkit.org/show_bug.cgi?id=188993
Reviewed by Brent Fulgham.
Source/WebCore:
Test: fast/text/rtl-justification.html
We simply need to guard glyphBuffer like we do in the rest of the function.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advanceInternal):
LayoutTests:
* fast/text/rtl-justification-expected.html: Added.
* fast/text/rtl-justification.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (235415 => 235416)
--- trunk/LayoutTests/ChangeLog 2018-08-28 00:35:26 UTC (rev 235415)
+++ trunk/LayoutTests/ChangeLog 2018-08-28 00:37:17 UTC (rev 235416)
@@ -1,3 +1,13 @@
+2018-08-27 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Null pointer deref in WidthIterator
+ https://bugs.webkit.org/show_bug.cgi?id=188993
+
+ Reviewed by Brent Fulgham.
+
+ * fast/text/rtl-justification-expected.html: Added.
+ * fast/text/rtl-justification.html: Added.
+
2018-08-27 Sihui Liu <sihui_...@apple.com>
[ MacOS iOS ] Layout Test storage/indexeddb/modern/opendatabase-after-storage-crash.html is flaky
Added: trunk/LayoutTests/fast/text/rtl-justification-expected.html (0 => 235416)
--- trunk/LayoutTests/fast/text/rtl-justification-expected.html (rev 0)
+++ trunk/LayoutTests/fast/text/rtl-justification-expected.html 2018-08-28 00:37:17 UTC (rev 235416)
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test passes if there is no crash.
+<div dir="rtl" style="width: 200px; text-align: justify;">
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+</div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/text/rtl-justification.html (0 => 235416)
--- trunk/LayoutTests/fast/text/rtl-justification.html (rev 0)
+++ trunk/LayoutTests/fast/text/rtl-justification.html 2018-08-28 00:37:17 UTC (rev 235416)
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+</head>
+<body>
+This test passes if there is no crash.
+<div dir="rtl" style="width: 200px; text-align: justify;">
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+תמיד להגיב על
+</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (235415 => 235416)
--- trunk/Source/WebCore/ChangeLog 2018-08-28 00:35:26 UTC (rev 235415)
+++ trunk/Source/WebCore/ChangeLog 2018-08-28 00:37:17 UTC (rev 235416)
@@ -1,3 +1,17 @@
+2018-08-27 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Null pointer deref in WidthIterator
+ https://bugs.webkit.org/show_bug.cgi?id=188993
+
+ Reviewed by Brent Fulgham.
+
+ Test: fast/text/rtl-justification.html
+
+ We simply need to guard glyphBuffer like we do in the rest of the function.
+
+ * platform/graphics/WidthIterator.cpp:
+ (WebCore::WidthIterator::advanceInternal):
+
2018-08-27 Wenson Hsieh <wenson_hs...@apple.com>
[Attachment Support] Remove WebCore::AttachmentDisplayOptions and friends
Modified: trunk/Source/WebCore/platform/graphics/WidthIterator.cpp (235415 => 235416)
--- trunk/Source/WebCore/platform/graphics/WidthIterator.cpp 2018-08-28 00:35:26 UTC (rev 235415)
+++ trunk/Source/WebCore/platform/graphics/WidthIterator.cpp 2018-08-28 00:37:17 UTC (rev 235416)
@@ -345,7 +345,7 @@
previousCharacter = character;
}
- if (leftoverJustificationWidth) {
+ if (glyphBuffer && leftoverJustificationWidth) {
if (m_forTextEmphasis)
glyphBuffer->add(lastFontData->zeroWidthSpaceGlyph(), lastFontData, leftoverJustificationWidth, m_run.length() - 1);
else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes