muxread,MuxGet: add an assert

assert idx != IDX_LAST_CHUNK to quiet a static analysis warning
(reported by Coverity):
  Indexing array kChunks of size 11 with idx.

Change-Id: I5e54b5c09d23c26abbd1a7919b6f828b35fe4f75
This commit is contained in:
James Zern 2024-03-20 12:36:37 -07:00
parent 1bf46358c4
commit 00abc0007c

View File

@ -37,6 +37,7 @@
static WebPMuxError MuxGet(const WebPMux* const mux, CHUNK_INDEX idx,
uint32_t nth, WebPData* const data) {
assert(mux != NULL);
assert(idx != IDX_LAST_CHUNK);
assert(!IsWPI(kChunks[idx].id));
WebPDataInit(data);