projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e909074
)
[S390] cio: fix wrong buffer access in cio_ignore_write
author
Sebastian Ott
<
[email protected]
>
Thu, 26 Mar 2009 14:24:16 +0000
(15:24 +0100)
committer
Martin Schwidefsky
<
[email protected]
>
Thu, 26 Mar 2009 14:24:16 +0000
(15:24 +0100)
Writing only spaces to /proc/cio_ignore will cause a buffer overflow
since the size_t value i will not become negative and so buf[-1UL] is
accessed. Change the value of i to ssize_t.
Signed-off-by: Sebastian Ott <
[email protected]
>
Signed-off-by: Martin Schwidefsky <
[email protected]
>
drivers/s390/cio/blacklist.c
patch
|
blob
|
history
diff --git
a/drivers/s390/cio/blacklist.c
b/drivers/s390/cio/blacklist.c
index fe00be3675cd6757c7a84d6aec6f58e99947485c..6565f027791eb5fe8bb91616ac6218a170c91c54 100644
(file)
--- a/
drivers/s390/cio/blacklist.c
+++ b/
drivers/s390/cio/blacklist.c
@@
-336,8
+336,7
@@
cio_ignore_write(struct file *file, const char __user *user_buf,
size_t user_len, loff_t *offset)
{
char *buf;
- size_t i;
- ssize_t rc, ret;
+ ssize_t rc, ret, i;
if (*offset)
return -EINVAL;