mailbox: Off by one in mbox_test_message_read()
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>
diff --git a/drivers/mailbox/mailbox-test.c b/drivers/mailbox/mailbox-test.c
index a4f10cc..f82dc89 100644
--- a/drivers/mailbox/mailbox-test.c
+++ b/drivers/mailbox/mailbox-test.c
@@ -143,7 +143,7 @@
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;