From 820064301793fc762efc08d765f243eaa768b72d Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 23 Feb 2016 11:13:38 -0800 Subject: [PATCH] anim_util: quiet static analysis warning in ReadAnimatedWebP() frame_index is tied to the reported frame_count. Change-Id: I69241e5d77a0b8bac1deabd992d0ad2ecf51a4ec --- examples/anim_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/anim_util.c b/examples/anim_util.c index 46f0c5d3..417fec2f 100644 --- a/examples/anim_util.c +++ b/examples/anim_util.c @@ -232,6 +232,7 @@ static int ReadAnimatedWebP(const char filename[], fprintf(stderr, "Error decoding frame #%u\n", frame_index); goto End; } + assert(frame_index < anim_info.frame_count); curr_frame = &image->frames[frame_index]; curr_rgba = curr_frame->rgba; curr_frame->duration = timestamp - prev_frame_timestamp;