diff options
Diffstat (limited to 'drivers/net/hamradio/hdlcdrv.c')
-rw-r--r-- | drivers/net/hamradio/hdlcdrv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c index 3169252613fa..5d78c1d08abd 100644 --- a/drivers/net/hamradio/hdlcdrv.c +++ b/drivers/net/hamradio/hdlcdrv.c | |||
@@ -571,6 +571,8 @@ static int hdlcdrv_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
571 | case HDLCDRVCTL_CALIBRATE: | 571 | case HDLCDRVCTL_CALIBRATE: |
572 | if(!capable(CAP_SYS_RAWIO)) | 572 | if(!capable(CAP_SYS_RAWIO)) |
573 | return -EPERM; | 573 | return -EPERM; |
574 | if (bi.data.calibrate > INT_MAX / s->par.bitrate) | ||
575 | return -EINVAL; | ||
574 | s->hdlctx.calibrate = bi.data.calibrate * s->par.bitrate / 16; | 576 | s->hdlctx.calibrate = bi.data.calibrate * s->par.bitrate / 16; |
575 | return 0; | 577 | return 0; |
576 | 578 | ||