X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2F4xm.c;h=336c651d3172963f6f574cc10b163fda35f258ee;hb=2c78a76cb0443f8a12a5eadc3b58373aa2f4ab22;hp=1f4e2aee24c2396336d6bff414208ea56d261d8c;hpb=8f92eb05e063e6c4d6e36521020620d4e6e1c21d;p=ffmpeg diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 1f4e2aee24c..336c651d317 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -525,6 +525,10 @@ static int decode_i_block(FourXContext *f, int16_t *block) break; if (code == 0xf0) { i += 16; + if (i >= 64) { + av_log(f->avctx, AV_LOG_ERROR, "run %d overflow\n", i); + return 0; + } } else { if (code & 0xf) { level = get_xbits(&f->gb, code & 0xf);