mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-07-30 16:26:19 +08:00
ARGBRotate180: Check if width * 4 would overflow
Change-Id: I1fd4ad42a282690c3f9ac0ea8b3874efb4d8c2ee Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/8117147 Reviewed-by: Frank Barchard <fbarchard@google.com>
This commit is contained in:
parent
c302f85bb1
commit
666b4ee514
@ -122,6 +122,9 @@ static int ARGBRotate180(const uint8_t* src_argb,
|
|||||||
ARGBMirrorRow_C;
|
ARGBMirrorRow_C;
|
||||||
void (*CopyRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) =
|
void (*CopyRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) =
|
||||||
CopyRow_C;
|
CopyRow_C;
|
||||||
|
if (width > INT_MAX / 4) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
align_buffer_64(row, width * 4);
|
align_buffer_64(row, width * 4);
|
||||||
if (!row)
|
if (!row)
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user