[M149] WTF: Use base::checked_cast for size casting in Vector constructors [chromium/src : refs/branch-heads/7827]

1 view
Skip to first unread message

chrome-cherry-picker@chops-service-accounts.iam.gserviceaccount.com (Gerrit)

unread,
May 21, 2026, 11:02:54 PM (14 days ago) May 21
to Kent Tamura, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-re...@chromium.org, kinuko...@chromium.org

chrome-che...@chops-service-accounts.iam.gserviceaccount.com voted Auto-Submit+1

Auto-Submit+1
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement satisfiedLint
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: refs/branch-heads/7827
Gerrit-Change-Id: Iff0edf2a1ce40da294c77f9c5eeb5898ac56611b
Gerrit-Change-Number: 7870451
Gerrit-PatchSet: 2
Gerrit-CC: Kent Tamura <tk...@chromium.org>
Gerrit-Comment-Date: Fri, 22 May 2026 03:02:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

rubber-stamper@appspot.gserviceaccount.com (Gerrit)

unread,
May 21, 2026, 11:03:22 PM (14 days ago) May 21
to chrome-che...@chops-service-accounts.iam.gserviceaccount.com, Kent Tamura, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-re...@chromium.org, kinuko...@chromium.org

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedLint
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: refs/branch-heads/7827
Gerrit-Change-Id: Iff0edf2a1ce40da294c77f9c5eeb5898ac56611b
Gerrit-Change-Number: 7870451
Gerrit-PatchSet: 2
Gerrit-Comment-Date: Fri, 22 May 2026 03:03:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
May 22, 2026, 12:26:54 AM (14 days ago) May 22
to chrome-che...@chops-service-accounts.iam.gserviceaccount.com, Kent Tamura, rubber-...@appspot.gserviceaccount.com, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, blink-re...@chromium.org, kinuko...@chromium.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
[M149] WTF: Use base::checked_cast for size casting in Vector constructors

Original change's description:
> WTF: Use base::checked_cast for size casting in Vector constructors
>
> Initializing a blink::Vector from a base::span or a range uses size_t
> for the input size, but blink::Vector internally uses wtf_size_t
> (32-bit) for its size representation.
>
> This change introduces base::checked_cast<wtf_size_t> during
> construction to ensure that if the input size exceeds the 32-bit limit,
> the process crashes safely. This prevents silent integer truncation,
> which could otherwise lead to memory safety issues such as buffer
> overflows.
>
> No unit tests are added because it is impractical to allocate a 4GB+
> buffer to trigger this condition in a standard test environment.
>
> Bug: 514746176
> Change-Id: Iff0edf2a1ce40da294c77f9c5eeb5898ac56611b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7861980
> Reviewed-by: Kentaro Hara <har...@chromium.org>
> Commit-Queue: Kent Tamura <tk...@chromium.org>
> Auto-Submit: Kent Tamura <tk...@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1633311}

(cherry picked from commit ddf427ac6b17eb7fc8ffb41adbac960acbe4d73d)
Bug: 515275683,514746176
Change-Id: Iff0edf2a1ce40da294c77f9c5eeb5898ac56611b
Cr-Commit-Position: refs/branch-heads/7827@{#1454}
Cr-Branched-From: 9f3e9aaccba63bd2ec30334e45e0bfd07ebcc8f1-refs/heads/main@{#1625079}
Files:
  • M third_party/blink/renderer/platform/wtf/vector.h
Change size: XS
Delta: 1 file changed, 4 insertions(+), 4 deletions(-)
Branch: refs/branch-heads/7827
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: chromium/src
Gerrit-Branch: refs/branch-heads/7827
Gerrit-Change-Id: Iff0edf2a1ce40da294c77f9c5eeb5898ac56611b
Gerrit-Change-Number: 7870451
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages