Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c5b50b5798c546487e961aa2984082c729c80b0b
      
https://github.com/WebKit/WebKit/commit/c5b50b5798c546487e961aa2984082c729c80b0b
  Author: Shu-yu Guo <[email protected]>
  Date:   2025-07-14 (Mon, 14 Jul 2025)

  Changed paths:
    M JSTests/test262/expectations.yaml
    M Source/WTF/wtf/simdutf/simdutf_impl.cpp.h
    M Source/WTF/wtf/simdutf/simdutf_impl.h
    M Source/WTF/wtf/text/Base64.cpp

  Log Message:
  -----------
  [JSC] Fix Uint8Array fromBase64 and setFromBase64 for invalid 1-chunk input
https://bugs.webkit.org/show_bug.cgi?id=295578
rdar://155346981

Reviewed by Yusuke Suzuki.

This PR updates simdutf to 7.3.3, fixes handling of invalid 1-chunk input in
base64 decoding, and removes the slow fallback.

First, base64 input is changed to unconditionally decode even when the expected
decoded binary size is 0. Previously, there was a fast path in fromBase64 input
to an empty Uint8Array when the expected decoded binary size is 0. This is
incorrect when the input contains a single invalid chunk, as it skips decoding
entirely when it should attempt to and report the error.

Second, use simdutf to decode base64 for all values of lastChunkHandling.
Previously, simdutf was only used for 'loose', and a slow fallback was used for
'strict' and 'stop-before-partial'. Now simdutf has support for all 3, so use
it and remove the fallback.

Note that simdutf currently has a bug for the read count when lastChunkHandling
is 'stop-before-partial', which this patch works around.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to