mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
vp8l_dec,ReadTransform: improve error status reporting
ExpandColorMap() can fail due to a memory allocation failure. Found by Nallocfuzz (https://github.com/catenacyber/nallocfuzz). Change-Id: I868c5db2fee18e876f4aa3b63e744d7297d1a91b
This commit is contained in:
parent
7d8e0896e9
commit
af7fbfd2d9
@ -1326,7 +1326,9 @@ static int ReadTransform(int* const xsize, int const* ysize,
|
||||
transform->bits_ = bits;
|
||||
ok = DecodeImageStream(num_colors, /*ysize=*/1, /*is_level0=*/0, dec,
|
||||
&transform->data_);
|
||||
ok = ok && ExpandColorMap(num_colors, transform);
|
||||
if (ok && !ExpandColorMap(num_colors, transform)) {
|
||||
return VP8LSetError(dec, VP8_STATUS_OUT_OF_MEMORY);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SUBTRACT_GREEN_TRANSFORM:
|
||||
|
Loading…
Reference in New Issue
Block a user