mirror of
https://github.com/proski/madwifi
synced 2024-11-21 22:11:32 +03:00
Fix off-by-one error in size parsing in proc_ratesample_open()
sizeof("string") includes the trailing 0, strlen("string") doesn't.
This commit is contained in:
parent
e6cb21364b
commit
3f778edc5f
@ -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 */
|
/* Determine what size packets to get stats for based on proc filename */
|
||||||
size = simple_strtoul(file->f_dentry->d_name.name +
|
size = simple_strtoul(file->f_dentry->d_name.name +
|
||||||
sizeof("ratestats_"), NULL, 0);
|
strlen("ratestats_"), NULL, 0);
|
||||||
if (size < 250 || size > 3000)
|
if (size < 250 || size > 3000)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user