WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
276859
[JSC] `Uint8Array#setFromBase64` should decode and write chunks which occur prior to bad data
https://bugs.webkit.org/show_bug.cgi?id=276859
Summary
[JSC] `Uint8Array#setFromBase64` should decode and write chunks which occur p...
Sosuke Suzuki
Reported
2024-07-21 02:28:31 PDT
According to the spec[1][2] and the test[3], Uint8Array.prototype.setFromBase64 throws a SyntaxError when encountering bad data but writes the decoded chunks prior to bad data. However, the current JSC discards the decoded data upon encountering bad data and throws an error. [1]:
https://tc39.es/proposal-arraybuffer-base64/spec/#sec-uint8array.prototype.setfrombase64
[2]:
https://tc39.es/proposal-arraybuffer-base64/spec/#sec-frombase64
[3]:
https://github.com/tc39/test262/blob/main/test/built-ins/Uint8Array/prototype/setFromBase64/writes-up-to-error.js
Attachments
Add attachment
proposed patch, testcase, etc.
Sosuke Suzuki
Comment 1
2024-07-21 02:31:20 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/31037
EWS
Comment 2
2024-07-21 12:30:35 PDT
Committed
281174@main
(77046030809c): <
https://commits.webkit.org/281174@main
> Reviewed commits have been landed. Closing PR #31037 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2024-07-21 12:31:14 PDT
<
rdar://problem/132198988
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug