mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/diracdec: Move buf[] read after size check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
984f50deb2
commit
5a455dd011
@ -1815,12 +1815,14 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
|
||||
{
|
||||
DiracContext *s = avctx->priv_data;
|
||||
DiracFrame *pic = NULL;
|
||||
int ret, i, parse_code = buf[4];
|
||||
int ret, i, parse_code;
|
||||
unsigned tmp;
|
||||
|
||||
if (size < DATA_UNIT_HEADER_SIZE)
|
||||
return -1;
|
||||
|
||||
parse_code = buf[4];
|
||||
|
||||
init_get_bits(&s->gb, &buf[13], 8*(size - DATA_UNIT_HEADER_SIZE));
|
||||
|
||||
if (parse_code == pc_seq_header) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user