Commit 1341dbd2 authored by Frank Tang's avatar Frank Tang Committed by Commit Bot

[int] Fix security bug in Intl.ListFormat

Also add test to ensure it won't crash. The crash is caused by int32_t overflow inside ICU68-1

Real fix in https://chromium.googlesource.com/chromium/deps/icu/+/3bf08c6a50f77921ae79d4e715b580b959e494c7

Bug: chromium:1150371
Change-Id: I71c7bb3c50453fe3fa40226cab83bee0d865b0f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2551212Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71357}
parent 0e0d1b0d
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Make sure it won't crash
var s = "b".repeat(0xAAAFFFF);
assertThrows(() => new Intl.ListFormat().format(Array(16).fill(s)).length,
TypeError);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment