Wan-Teh Chang
62fffa9eeb
Fix integer overflow when flipping negative height
...
Treat height == INT_MIN as invalid. Omit explicit height == INT_MIN
check if we disallow height < 32768.
Perform multiplications of stride in the ptrdiff_t type.
Add checks for invalid width and height to some functions.
Bug: 518806561
Change-Id: I5e39fffed7f806852a8758d4b59df919839c0a3b
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/7891415
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
2026-06-03 16:17:37 -07:00
Frank Barchard
e0040eb318
Apply clang format
...
Bug: None
Change-Id: I0d9db4b384144523e61ae32b6ab3f72e93a0c265
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6138934
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Wan-Teh Chang <wtc@google.com>
2025-01-02 13:31:20 -08:00
Frank Barchard
7633328b5f
Make functions that malloc check for ubsan math overflow
...
- add support for negative heights
- sanity check null pointers and invalid width/height
Bug: b/371615496
Change-Id: Icbefcb1ccc5cdf90e417c73440c6fad3b63ed7df
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5917072
Reviewed-by: Wan-Teh Chang <wtc@google.com>
2024-10-08 21:08:34 +00:00
Wan-Teh Chang
364b7fa81b
Remove redundant unsigned integer overflow tests
...
Bug: b/371615496
Change-Id: I28df888942085138a54e18c7e939300d959c68b0
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5914872
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2024-10-08 01:14:35 +00:00
Frank Barchard
ffd791f749
Check malloc allocation sizes are less than SIZE_MAX
...
Bug: b/371615496
Change-Id: I75a94b08469d6d6b6fd55a8659031cbcb3d48eed
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5912039
Reviewed-by: Wan-Teh Chang <wtc@google.com>
2024-10-07 21:34:15 +00:00
Frank Barchard
124bf08fee
RGBScale function using 3 steps: RGB24ToARGB, ARGBScale, ARGBToRGB24
...
1920x1080 to/from 1280x720 to ARGB on Intel Skylake Xeon
RGBScaleTo1920x1080_Bilinear (2625 ms)
RGBScaleFrom1920x1080_Bilinear (2115 ms)
ARGBScaleTo1920x1080_Bilinear (1668 ms)
ARGBScaleFrom1920x1080_Bilinear (1164 ms)
Bug: b/224814071
Change-Id: Ifc7611b597409771728b13c9c39e5a7e06131021
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3537341
Reviewed-by: Wan-Teh Chang <wtc@google.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2022-03-19 01:44:06 +00:00