Mercurial > libavcodec.hg
comparison flac.c @ 4366:f8753597422c libavcodec
Fix crash when pred_order greater s->blocksize >> rice_order.
Fixes http://sam.zoy.org/zzuf/lol-mplayer.flac
author | reimar |
---|---|
date | Sun, 21 Jan 2007 09:55:28 +0000 |
parents | 1e251b54cba2 |
children | 13ffe6b5bd0e |
comparison
equal
deleted
inserted
replaced
4365:9cebff821565 | 4366:f8753597422c |
---|---|
223 } | 223 } |
224 | 224 |
225 rice_order = get_bits(&s->gb, 4); | 225 rice_order = get_bits(&s->gb, 4); |
226 | 226 |
227 samples= s->blocksize >> rice_order; | 227 samples= s->blocksize >> rice_order; |
228 if (pred_order > samples) { | |
229 av_log(s->avctx, AV_LOG_ERROR, "invalid predictor order: %i > %i\n", pred_order, samples); | |
230 return -1; | |
231 } | |
228 | 232 |
229 sample= | 233 sample= |
230 i= pred_order; | 234 i= pred_order; |
231 for (partition = 0; partition < (1 << rice_order); partition++) | 235 for (partition = 0; partition < (1 << rice_order); partition++) |
232 { | 236 { |