mirror of https://git.ffmpeg.org/ffmpeg.git
Check for symbol count
Originally committed as revision 6910 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
3f509ba122
commit
f4e31985da
|
@ -140,6 +140,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
|
||||||
s->nodes[i].sym = i;
|
s->nodes[i].sym = i;
|
||||||
s->nodes[i].count = LE_32(src);
|
s->nodes[i].count = LE_32(src);
|
||||||
s->nodes[i].n0 = -2;
|
s->nodes[i].n0 = -2;
|
||||||
|
if(s->nodes[i].count < 0) {
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "Symbol count < 0\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
src += 4;
|
src += 4;
|
||||||
sum += s->nodes[i].count;
|
sum += s->nodes[i].count;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue