From 00abc0007c1228994fec2902ceb3ff3552d1bff6 Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 20 Mar 2024 12:36:37 -0700 Subject: [PATCH] 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 --- src/mux/muxread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mux/muxread.c b/src/mux/muxread.c index 37ddd901..64df1659 100644 --- a/src/mux/muxread.c +++ b/src/mux/muxread.c @@ -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);