vct: avoid read descriptors past the buffer
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 14 Feb 2014 04:39:07 +0000 (13:39 +0900)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 15 Feb 2014 18:48:43 +0000 (03:48 +0900)
commit6e7f400d5865f1ae4abc6f9b36c19d9408d81895
tree4e3ef3eeb1c778c061e57e4455983a0e99a5c8f0
parent6ac30786ded731fab386b26c1355723649a16592
vct: avoid read descriptors past the buffer

On some ATSC streams found in KR, the descriptor_length at the
VCT tables are found to be bigger than the remaining buffer
size.

While this could be due to some other problem, add a logic to
prevent going paste the buffer.

Likely, this patch should also be ported to other places where
dvb_parse_descriptors() is called.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
lib/libdvbv5/descriptors/vct.c