Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] dvb-net: Fix probable mask then right shift defects

Precedence of & and >> is not the same and is not left to right.
shift has higher precedence and should be done after the mask.

Add parentheses around the mask.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Joe Perches and committed by
Mauro Carvalho Chehab
f491dbe0 e5f3d00c

+3 -1
+3 -1
drivers/media/dvb-core/dvb_net.c
··· 379 379 /* Check TS error conditions: sync_byte, transport_error_indicator, scrambling_control . */ 380 380 if ((ts[0] != TS_SYNC) || (ts[1] & TS_TEI) || ((ts[3] & TS_SC) != 0)) { 381 381 printk(KERN_WARNING "%lu: Invalid TS cell: SYNC %#x, TEI %u, SC %#x.\n", 382 - priv->ts_count, ts[0], ts[1] & TS_TEI >> 7, ts[3] & 0xC0 >> 6); 382 + priv->ts_count, ts[0], 383 + (ts[1] & TS_TEI) >> 7, 384 + (ts[3] & 0xC0) >> 6); 383 385 384 386 /* Drop partly decoded SNDU, reset state, resync on PUSI. */ 385 387 if (priv->ule_skb) {