aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2024-03-22 01:01:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-03-22 01:01:04 +0000
commit955a3d14aef2d52988315f9f13372b47acefe02d (patch)
tree72257f65876cf78171bb8089f4c4ca029cd0e4e1
parent40e85a0b563593bb51b05228e9e30b582604de97 (diff)
parent00abc0007c1228994fec2902ceb3ff3552d1bff6 (diff)
downloadwebp-955a3d14aef2d52988315f9f13372b47acefe02d.tar.gz
Merge "muxread,MuxGet: add an assert" into main
-rw-r--r--src/mux/muxread.c1
1 files changed, 1 insertions, 0 deletions
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);