muxread: fix 0 offset of NULL pointer

BUG=chromium:1028620,chromium:1027409

Change-Id: I2b5527a223a03161afbf39c297c4646954a91fbc
This commit is contained in:
James Zern 2019-12-14 20:43:15 +00:00
parent 0df474ac9e
commit 290dd0b426

View File

@ -100,7 +100,7 @@ static int MuxImageParse(const WebPChunk* const chunk, int copy_data,
WebPMuxImage* const wpi) { WebPMuxImage* const wpi) {
const uint8_t* bytes = chunk->data_.bytes; const uint8_t* bytes = chunk->data_.bytes;
size_t size = chunk->data_.size; size_t size = chunk->data_.size;
const uint8_t* const last = bytes + size; const uint8_t* const last = (bytes == NULL) ? NULL : bytes + size;
WebPChunk subchunk; WebPChunk subchunk;
size_t subchunk_size; size_t subchunk_size;
WebPChunk** unknown_chunk_list = &wpi->unknown_; WebPChunk** unknown_chunk_list = &wpi->unknown_;