Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ea29af73c09a74960431c3dc304465e8dd34536a
https://github.com/WebKit/WebKit/commit/ea29af73c09a74960431c3dc304465e8dd34536a
Author: Lily Spiniolas <[email protected]>
Date: 2025-12-16 (Tue, 16 Dec 2025)
Changed paths:
M Source/WebCore/editing/TextListParser.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SmartLists.mm
Log Message:
-----------
[Smart Lists] Creating an ordered decimal list beginning with a large number
causes the WebProcess to crash
https://bugs.webkit.org/show_bug.cgi?id=304229
rdar://166264813
Reviewed by Richard Robinson.
`consumeNumber` in `TextListParser` now returns an optional int, and
checks if an overflow occurred during the calculation of its value. If
an overflow occurred, return `std::nullopt`. When `consumeNumber` is
called from `tryConsumeOrderedDecimalTextList`, check if a value exists
before continuing, otherwise skip to the end of the buffer and return
`std::nullopt`.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/SmartLists.mm
* Source/WebCore/editing/TextListParser.cpp:
(WebCore::consumeNumber):
(WebCore::tryConsumeOrderedDecimalTextList):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SmartLists.mm:
((SmartLists, InsertingSpaceAfterLargeNumberDoesNotGenerateOrderedList)):
Canonical link: https://commits.webkit.org/304531@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications