Skip to content

Commit

Permalink
Staging: dream, fix buf overflow
Browse files Browse the repository at this point in the history
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: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent 58c6d6d commit 4d62691
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/dream/camera/msm_vfe8x_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4d62691

Please sign in to comment.