Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
parsers: AAC fix endless loop when ADTS data are invalid, fixes #3381
  • Loading branch information
perexg committed Dec 29, 2015
1 parent 6975129 commit b480c92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/parsers/parsers.c
Expand Up @@ -317,6 +317,12 @@ parse_aac(service_t *t, elementary_stream_t *st, const uint8_t *data,
if (l < muxlen)
break;

if (muxlen < 7) {
tvhtrace("parser", "AAC/ATDS skip byte %02x", d[0]);
p++;
continue;
}

latm = 0;
sbuf_reset(&st->es_buf_a, 4000);
sbuf_append(&st->es_buf_a, d, muxlen);
Expand Down

0 comments on commit b480c92

Please sign in to comment.