projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
siox: fix possible buffer overflow in device_add_store
[linux-block.git]
/
drivers
/
siox
/
siox-core.c
diff --git
a/drivers/siox/siox-core.c
b/drivers/siox/siox-core.c
index fdfcdea258678950d0c0cf502f7964a9087bf6cb..16590dfaafa448d43f00cbced0dbb457782fff93 100644
(file)
--- a/
drivers/siox/siox-core.c
+++ b/
drivers/siox/siox-core.c
@@
-594,7
+594,7
@@
static ssize_t device_add_store(struct device *dev,
size_t inbytes = 0, outbytes = 0;
u8 statustype = 0;
- ret = sscanf(buf, "%
20
s %zu %zu %hhu", type, &inbytes,
+ ret = sscanf(buf, "%
19
s %zu %zu %hhu", type, &inbytes,
&outbytes, &statustype);
if (ret != 3 && ret != 4)
return -EINVAL;