[webkit-changes] [WebKit/WebKit] 25a8fe: [JSC] btoa should handle out of memory

Commit Queue noreply at github.com
Wed May 3 08:53:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 25a8fed4606485426dde5ae825385c77026a72d7
      https://github.com/WebKit/WebKit/commit/25a8fed4606485426dde5ae825385c77026a72d7
  Author: Yijia Huang <yijia_huang at apple.com>
  Date:   2023-05-03 (Wed, 03 May 2023)

  Changed paths:
    A JSTests/stress/btoa-string-overflow.js
    M Source/JavaScriptCore/jsc.cpp
    M Source/WTF/wtf/text/Base64.cpp
    M Source/WTF/wtf/text/Base64.h

  Log Message:
  -----------
  [JSC] btoa should handle out of memory
https://bugs.webkit.org/show_bug.cgi?id=256240
rdar://108793523

Reviewed by Justin Michaud.

btoa should handle out of memory for encoded string.

* JSTests/stress/btoa-string-overflow.js: Added.
* Source/JavaScriptCore/jsc.cpp:
(JSC_DEFINE_HOST_FUNCTION):
* Source/WTF/wtf/text/Base64.cpp:
(WTF::base64EncodeToStringReturnNullIfOverflow):
* Source/WTF/wtf/text/Base64.h:
(WTF::base64EncodeToStringReturnNullIfOverflow):

Canonical link: https://commits.webkit.org/263632@main




More information about the webkit-changes mailing list