Found-by: Anthropic agents; validated and reported by Ada Logics.
Signed-off-by: David Korczynski <david@adalogics.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit
d30dead35e7fecae51ccd4602273153c87b1bbd9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
"Too small input buffer (%d bytes), need at least 32 bytes\n", buf_size);
return -1;
}
+ if (iterations > INT_MAX / 240) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Too large input buffer (%d bytes); per-block sample count overflows\n", buf_size);
+ return AVERROR_INVALIDDATA;
+ }
/* get output buffer */
frame->nb_samples = iterations * 240;