| Auto-Submit | +1 |
| Commit-Queue | +1 |
haraken@, would you review this please?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
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.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |