Dereference after NULL check.

Change-Id: Ia592affff075b2e00c150b89febcf676c7dcbbd2
This commit is contained in:
Vincent Rabaud 2023-10-11 14:21:54 +02:00
parent 786579711f
commit d2cb2d8cfc

View File

@ -326,10 +326,10 @@ static VP8StatusCode DecodeWebPHeaders(WebPIDecoder* const idec) {
idec->is_lossless_ = headers.is_lossless; idec->is_lossless_ = headers.is_lossless;
if (!idec->is_lossless_) { if (!idec->is_lossless_) {
VP8Decoder* const dec = VP8New(); VP8Decoder* const dec = VP8New();
dec->incremental_ = 1;
if (dec == NULL) { if (dec == NULL) {
return VP8_STATUS_OUT_OF_MEMORY; return VP8_STATUS_OUT_OF_MEMORY;
} }
dec->incremental_ = 1;
idec->dec_ = dec; idec->dec_ = dec;
dec->alpha_data_ = headers.alpha_data; dec->alpha_data_ = headers.alpha_data;
dec->alpha_data_size_ = headers.alpha_data_size; dec->alpha_data_size_ = headers.alpha_data_size;