[webkit-changes] [WebKit/WebKit] df11c6: [JSC] Fail gracefully when toBase64 result string ...
Yusuke Suzuki
noreply at github.com
Thu Aug 29 22:51:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: df11c6df0e27a4ac300cac175b79ff7ffe502ba0
https://github.com/WebKit/WebKit/commit/df11c6df0e27a4ac300cac175b79ff7ffe502ba0
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2024-08-29 (Thu, 29 Aug 2024)
Changed paths:
A JSTests/stress/too-large-base64-string.js
M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.cpp
Log Message:
-----------
[JSC] Fail gracefully when toBase64 result string is too large
https://bugs.webkit.org/show_bug.cgi?id=278899
rdar://134953795
Reviewed by Mark Lam.
toBase64 result can be larger than StringImpl max size. Use base64EncodeToStringReturnNullIfOverflow instead
to handle OOM case gracefully.
* JSTests/stress/too-large-base64-string.js: Added.
(shouldThrow):
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
Canonical link: https://commits.webkit.org/282949@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