mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 13:18:22 +01:00
webpdec: correct alloc size check w/use_argb
the allocation is always 4 x width regardless of the presence of alpha Change-Id: I154bd7e5c0190d37abd669e17e18911ebb7e066c
This commit is contained in:
parent
5cfb3b0f6c
commit
6ba98764e8
@ -145,7 +145,7 @@ int ReadWebP(const uint8_t* const data, size_t data_size,
|
||||
pic->width = bitstream->width;
|
||||
pic->height = bitstream->height;
|
||||
if (pic->use_argb) {
|
||||
stride = (uint64_t)bitstream->width * (has_alpha ? 4 : 3);
|
||||
stride = (uint64_t)bitstream->width * 4;
|
||||
} else {
|
||||
stride = (uint64_t)bitstream->width * (has_alpha ? 5 : 3) / 2;
|
||||
pic->colorspace = has_alpha ? WEBP_YUV420A : WEBP_YUV420;
|
||||
|
Loading…
Reference in New Issue
Block a user