[webkit-changes] [WebKit/WebKit] fa8948: Crash under makeString() in TextResourceDecoder::d...
Chris Dumez
noreply at github.com
Sat Aug 3 15:36:12 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fa8948cde34cafc320622c7d661ae40cb14edd6f
https://github.com/WebKit/WebKit/commit/fa8948cde34cafc320622c7d661ae40cb14edd6f
Author: Chris Dumez <cdumez at apple.com>
Date: 2024-08-03 (Sat, 03 Aug 2024)
Changed paths:
M Source/WebCore/loader/TextResourceDecoder.cpp
M Source/WebCore/platform/Logging.h
Log Message:
-----------
Crash under makeString() in TextResourceDecoder::decodeAndFlush()
https://bugs.webkit.org/show_bug.cgi?id=277565
rdar://133008864
Reviewed by Darin Adler.
The crash seems to occurs because makeString() calls CRASH() when the resulting
String's size wouldn't fit in a int32_t. There is nothing guaranteeing that the
decoded data will have a size that will fit in a int32_t so I'm updating the
code to use tryMakeString() instead which handles overflows without crashing
and log an error in this case.
* Source/WebCore/loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::decodeAndFlush):
Canonical link: https://commits.webkit.org/281811@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list