summaryrefslogtreecommitdiff
path: root/Toolchain/Patches
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2023-02-28 03:47:40 +0000
committerSam Atkins <atkinssj@gmail.com>2023-02-28 08:46:06 +0000
commite864444fe3b1fcbb2839f05df20463a99efb3850 (patch)
treedecd5ca19341e5c9b886b4aa8990fafd86c8d4f2 /Toolchain/Patches
parent1c918e826c337bb46277cb224e29107ce576eeab (diff)
downloadserenity-e864444fe3b1fcbb2839f05df20463a99efb3850.zip
LibTextCodec/Latin1: Iterate over input string with u8 instead of char
Using char causes bytes equal to or over 0x80 to be treated as a negative value and produce incorrect results when implicitly casting to u32. For example, `atob` in LibWeb uses this decoder to convert non-ASCII values to UTF-8, but non-ASCII values are >= 0x80 and thus produces incorrect results in such cases: ```js Uint8Array.from(atob("u660"), c => c.charCodeAt(0)); ``` This used to produce [253, 253, 253] instead of [187, 174, 180]. Required by Cloudflare's IUAM challenges.
Diffstat (limited to 'Toolchain/Patches')
0 files changed, 0 insertions, 0 deletions