make sure packet length is big enough to read header
This commit is contained in:
parent
eee47feb7a
commit
9078f66d26
1 changed files with 3 additions and 0 deletions
3
pes.c
3
pes.c
|
@ -84,6 +84,9 @@ pes_packet_input(th_transport_t *t, th_stream_t *st, uint8_t *buf, size_t len)
|
|||
|
||||
avgstat_add(&st->st_rate, len, dispatch_clock);
|
||||
|
||||
if(len < 3)
|
||||
return -1;
|
||||
|
||||
hdr = getu8(buf, len);
|
||||
flags = getu8(buf, len);
|
||||
hlen = getu8(buf, len);
|
||||
|
|
Loading…
Add table
Reference in a new issue