mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-13 07:22:52 +01:00
fix bug in alpha.c that was triggering a memory error in incremental mode
this change will be superseded by patch #335160 eventually, but until then let's fix the problem temporarily. Change-Id: Iafd979c2ff6801e3f1de4614870ca854a4747b04
This commit is contained in:
parent
9a950c5375
commit
8dca0247d2
@ -131,6 +131,8 @@ const uint8_t* VP8DecompressAlphaRows(VP8Decoder* const dec,
|
||||
return NULL; // sanity check.
|
||||
}
|
||||
|
||||
if (!dec->is_alpha_decoded_) {
|
||||
int ok;
|
||||
if (dec->alph_dec_ == NULL) { // Initialize decoder.
|
||||
assert(dec->alpha_plane_ != NULL);
|
||||
dec->alph_dec_ = ALPHNew();
|
||||
@ -153,8 +155,7 @@ const uint8_t* VP8DecompressAlphaRows(VP8Decoder* const dec,
|
||||
num_rows = height - row;
|
||||
}
|
||||
|
||||
if (!dec->is_alpha_decoded_) {
|
||||
int ok = ALPHDecode(dec, row, num_rows);
|
||||
ok = ALPHDecode(dec, row, num_rows);
|
||||
assert(dec->alph_dec_ != NULL);
|
||||
if (!ok || dec->is_alpha_decoded_) {
|
||||
ALPHDelete(dec->alph_dec_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user