cef2d17385
If an error message was reported from Tint that had a end line/position that occurred before the start line/position then the range would have a negative length, causing the unsigned length to underflow into a very large value. Also, specifically, if the start line was non-zero but the end line was zero (indicating no line, and the value ranges are constructed with by default) the for loop that adds the line offsets would underflow and cause it to read off the end of the line list. Clamping the end of the range to always be less than or equal to the start of the range avoids both of these problems. Bug: dawn:1245 Change-Id: I780a1f5acc228297cbbea86f33679d00e9153b4c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75260 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Brandon Jones <bajones@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org> |
||
---|---|---|
.. | ||
common | ||
dawn | ||
dawn_native | ||
dawn_node | ||
dawn_platform | ||
dawn_wire | ||
fuzzers | ||
include | ||
tests | ||
utils | ||
Dummy.cpp |