提交 4d62691b 编写于 作者: J Jiri Slaby 提交者: Greg Kroah-Hartman

Staging: dream, fix buf overflow

In vfe_send_msg_no_payload there is a wrong struct vfe_message allocation.
It allocates only sizeof(pointer to vfe_message) for a whole structure.
Add a dereference to the sizeof to allocate sizeof(vfe_message).
Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
Acked-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 58c6d6d1
......@@ -818,7 +818,7 @@ static void vfe_send_msg_no_payload(enum VFE_MESSAGE_ID id)
{
struct vfe_message *msg;
msg = kzalloc(sizeof(msg), GFP_ATOMIC);
msg = kzalloc(sizeof(*msg), GFP_ATOMIC);
if (!msg)
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册