Skip to content

Commit 4053c47

Browse files
committed
Merge tag 'media/v7.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fix from Mauro Carvalho Chehab: "Fix for MPEG-TS decoder in dvb-net" * tag 'media/v7.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: dvb-net: fix OOB access in ULE extension header tables
2 parents 40d3f62 + 24d8771 commit 4053c47

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/media/dvb-core/dvb_net.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ static int handle_one_ule_extension( struct dvb_net_priv *p )
228228
unsigned char hlen = (p->ule_sndu_type & 0x0700) >> 8;
229229
unsigned char htype = p->ule_sndu_type & 0x00FF;
230230

231+
if (htype >= ARRAY_SIZE(ule_mandatory_ext_handlers))
232+
return -1;
233+
231234
/* Discriminate mandatory and optional extension headers. */
232235
if (hlen == 0) {
233236
/* Mandatory extension header */

0 commit comments

Comments
 (0)