summaryrefslogtreecommitdiff
path: root/drivers/isdn/i4l
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-10-09 23:42:18 (GMT)
committerDavid S. Miller <davem@davemloft.net>2012-10-11 02:50:45 (GMT)
commit435f08a721919a0027ff4f39f0b51c141c0e2c29 (patch)
treec199eb13057b333a03ec2c134c119bfbed36ba0b /drivers/isdn/i4l
parent34e02aa1fb0886d8e92ab00e3dc17d631487f92d (diff)
downloadlinux-435f08a721919a0027ff4f39f0b51c141c0e2c29.tar.xz
isdn: fix a wrapping bug in isdn_ppp_ioctl()
"protos" is an array of unsigned longs and "i" is the number of bits in an unsigned long so we need to use 1UL as well to prevent the shift from wrapping around. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index a1e7601..61d78fa 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -595,7 +595,7 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
j = ipc->num / (sizeof(long) * 8);
i = ipc->num % (sizeof(long) * 8);
if (j < 8)
- protos[j] |= (0x1 << i);
+ protos[j] |= (1UL << i);
ipc = ipc->next;
}
if ((r = set_arg(argp, protos, 8 * sizeof(long))))