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:
8e3c595
)
mailbox: Off by one in mbox_test_message_read()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 22 Oct 2015 19:51:27 +0000
(22:51 +0300)
committer
Jassi Brar
<jaswinder.singh@linaro.org>
Tue, 27 Oct 2015 15:57:25 +0000
(21:27 +0530)
We need to leave space for the NUL char.
Fixes: 8ea4484d0c2b ('mailbox: Add generic mechanism for testing Mailbox Controllers')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
drivers/mailbox/mailbox-test.c
patch
|
blob
|
history
diff --git
a/drivers/mailbox/mailbox-test.c
b/drivers/mailbox/mailbox-test.c
index a4f10cc4aea3f5b5f17648486c709f3be5a0343d..f82dc89266879b4dca394e574be4dbc382a1f0e1 100644
(file)
--- a/
drivers/mailbox/mailbox-test.c
+++ b/
drivers/mailbox/mailbox-test.c
@@
-143,7
+143,7
@@
static ssize_t mbox_test_message_read(struct file *filp, char __user *userbuf,
int l = 0;
int ret;
- touser = kzalloc(MBOX_HEXDUMP_MAX_LEN, GFP_KERNEL);
+ touser = kzalloc(MBOX_HEXDUMP_MAX_LEN
+ 1
, GFP_KERNEL);
if (!touser)
return -ENOMEM;