Fix off-by-one error in size parsing in proc_ratesample_open()
[madwifi/.git] / ath_rate / sample / sample.c
index 5baaf8c7583f074822e4ec838cb55f6b2da98514..01ccfbab5861a753e776a521e3e94ccb45b579f2 100644 (file)
@@ -1050,7 +1050,7 @@ proc_ratesample_open(struct inode *inode, struct file *file)
 
        /* Determine what size packets to get stats for based on proc filename */
        size = simple_strtoul(file->f_dentry->d_name.name +
-                             sizeof("ratestats_"), NULL, 0);
+                             strlen("ratestats_"), NULL, 0);
        if (size < 250 || size > 3000)
                return -ENOENT;