projects
/
madwifi
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6cb213
)
Fix off-by-one error in size parsing in proc_ratesample_open()
author
Pavel Roskin
<proski@gnu.org>
Tue, 12 Nov 2013 20:55:46 +0000
(15:55 -0500)
committer
Pavel Roskin
<proski@gnu.org>
Tue, 12 Nov 2013 20:55:46 +0000
(15:55 -0500)
sizeof("string") includes the trailing 0, strlen("string") doesn't.
ath_rate/sample/sample.c
patch
|
blob
|
history
diff --git
a/ath_rate/sample/sample.c
b/ath_rate/sample/sample.c
index 5baaf8c7583f074822e4ec838cb55f6b2da98514..01ccfbab5861a753e776a521e3e94ccb45b579f2 100644
(file)
--- a/
ath_rate/sample/sample.c
+++ b/
ath_rate/sample/sample.c
@@
-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 +
- s
izeof
("ratestats_"), NULL, 0);
+ s
trlen
("ratestats_"), NULL, 0);
if (size < 250 || size > 3000)
return -ENOENT;