mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
cosmetics: shorten long line
Change-Id: I78bb19cf593730e74734e08d3d6de08a29bd9cbc
This commit is contained in:
parent
89d803c423
commit
e025fb5546
@ -72,10 +72,10 @@ int WebPPictureAlloc(WebPPicture* const picture) {
|
|||||||
total_size = y_size + a_size + 2 * uv_size + 2 * uv0_size;
|
total_size = y_size + a_size + 2 * uv_size + 2 * uv0_size;
|
||||||
|
|
||||||
// Security and validation checks
|
// Security and validation checks
|
||||||
if (width <= 0 || height <= 0 || // check for luma/alpha param error
|
if (width <= 0 || height <= 0 || // luma/alpha param error
|
||||||
uv_width < 0 || uv_height < 0 || // check for u/v param error
|
uv_width < 0 || uv_height < 0 || // u/v param error
|
||||||
y_size >= (1ULL << 40) || // check for reasonable global size
|
y_size >= (1ULL << 40) || // reasonable global size
|
||||||
(size_t)total_size != total_size) { // check for overflow on 32bit
|
(size_t)total_size != total_size) { // overflow on 32bit
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
picture->y_stride = y_stride;
|
picture->y_stride = y_stride;
|
||||||
|
Loading…
Reference in New Issue
Block a user