make sure packet length is big enough to read header

This commit is contained in:
Andreas Öman 2007-11-22 20:26:18 +00:00
parent eee47feb7a
commit 9078f66d26

3
pes.c
View file

@ -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);