Fixes out of array access
Fixes: signal_sigsegv_324b135_3398_cov_246853371_short.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e5c01ccdf5a9a330d4c51a9b9ea721fd8f1fb70b)
Conflicts:
libavcodec/flacdec.c
... | ... |
@@ -473,10 +473,10 @@ static int decode_frame(FLACContext *s) |
473 | 473 |
ret = allocate_buffers(s); |
474 | 474 |
if (ret < 0) |
475 | 475 |
return ret; |
476 |
- ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps); |
|
477 | 476 |
s->got_streaminfo = 1; |
478 | 477 |
dump_headers(s->avctx, (FLACStreaminfo *)s); |
479 | 478 |
} |
479 |
+ ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps); |
|
480 | 480 |
|
481 | 481 |
// dump_headers(s->avctx, (FLACStreaminfo *)s); |
482 | 482 |
|