USB: cxacru: fix an bounds check warning
[deliverable/linux.git] / drivers / usb / atm / cxacru.c
index 1173f9cbc137ef1b175a84de7d2c8c81219323f5..0a866e90b49c80ee04061ae1af3ac5020dd3a237 100644 (file)
@@ -476,6 +476,8 @@ static ssize_t cxacru_sysfs_store_adsl_config(struct device *dev,
                        return -EINVAL;
                if (index < 0 || index > 0x7f)
                        return -EINVAL;
+               if (tmp < 0 || tmp > len - pos)
+                       return -EINVAL;
                pos += tmp;
 
                /* skip trailing newline */
This page took 0.024535 seconds and 5 git commands to generate.