Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c86f28b
)
- added few sanity check to seq_proc_write_range()
author
yury
<yury>
Thu, 22 Jun 2006 11:48:45 +0000
(11:48 +0000)
committer
yury
<yury>
Thu, 22 Jun 2006 11:48:45 +0000
(11:48 +0000)
lustre/fid/lproc_fid.c
patch
|
blob
|
history
diff --git
a/lustre/fid/lproc_fid.c
b/lustre/fid/lproc_fid.c
index
141be0a
..
e0691d8
100644
(file)
--- a/
lustre/fid/lproc_fid.c
+++ b/
lustre/fid/lproc_fid.c
@@
-62,6
+62,13
@@
seq_proc_write_range(struct file *file, const char *buffer,
rc = sscanf(buffer, "["LPU64"-"LPU64"]\n",
&tmp.lr_start, &tmp.lr_end);
+ /* did not match 2 values */
+ if (rc != 2 || !range_is_sane(&tmp) || range_is_zero(&tmp)) {
+ CERROR("can't parse input string or "
+ "input is not correct\n");
+ RETURN(count);
+ }
+
*range = tmp;
RETURN(count);
}