Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 19b0f989a04ee0c2f9250018786b7d549a64c48f
https://github.com/WebKit/WebKit/commit/19b0f989a04ee0c2f9250018786b7d549a64c48f
Author: Ahmad Saleem <[email protected]>
Date: 2026-09-13 (Sun, 13 Sep 2026)
Changed paths:
M Source/WebCore/platform/network/DataURLDecoder.cpp
Log Message:
-----------
DataURLDecoder::process() has a dead ternary branch computing encodedDataStart
https://bugs.webkit.org/show_bug.cgi?id=324050
rdar://187287967
Reviewed by Chris Dumez.
In DataURLDecoder::process(), the function already returns false when the
comma delimiter is not found:
size_t headerEnd = url.string().find(',', headerStart);
if (headerEnd == notFound)
return false;
By the time we compute encodedDataStart, headerEnd can therefore never be
notFound, so the ternary:
size_t encodedDataStart = headerEnd == notFound ? headerEnd : headerEnd + 1;
always takes the headerEnd + 1 branch. Replace it with the direct
assignment. No behavior change.
* Source/WebCore/platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::DecodeTask::process):
Canonical link: https://commits.webkit.org/321023@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications