Commit 4053c476 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 40d3f622 24d87712
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -228,6 +228,9 @@ static int handle_one_ule_extension( struct dvb_net_priv *p )
	unsigned char hlen = (p->ule_sndu_type & 0x0700) >> 8;
	unsigned char htype = p->ule_sndu_type & 0x00FF;

	if (htype >= ARRAY_SIZE(ule_mandatory_ext_handlers))
		return -1;

	/* Discriminate mandatory and optional extension headers. */
	if (hlen == 0) {
		/* Mandatory extension header */