1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Fix crash when pred_order greater s->blocksize >> rice_order.

Fixes http://sam.zoy.org/zzuf/lol-mplayer.flac

Originally committed as revision 7595 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Reimar Döffinger 2007-01-21 09:55:28 +00:00
parent edb6e50682
commit 5484dad7f6

View File

@ -225,6 +225,10 @@ static int decode_residuals(FLACContext *s, int channel, int pred_order)
rice_order = get_bits(&s->gb, 4); rice_order = get_bits(&s->gb, 4);
samples= s->blocksize >> rice_order; samples= s->blocksize >> rice_order;
if (pred_order > samples) {
av_log(s->avctx, AV_LOG_ERROR, "invalid predictor order: %i > %i\n", pred_order, samples);
return -1;
}
sample= sample=
i= pred_order; i= pred_order;