projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0158489
)
Staging: hv: mousevsc: Handle the case where we may get bogus report desc size
author
K. Y. Srinivasan
<kys@microsoft.com>
Thu, 29 Sep 2011 18:54:45 +0000
(11:54 -0700)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 4 Oct 2011 17:39:32 +0000
(10:39 -0700)
Handle the case where we may get bogus report desc size from the host.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/hv_mouse.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/hv/hv_mouse.c
b/drivers/staging/hv/hv_mouse.c
index b7cc16471ec47423e717b07463d676b74129483c..19cfc231ab99425db5cca84d6c8cc61b569af7f9 100644
(file)
--- a/
drivers/staging/hv/hv_mouse.c
+++ b/
drivers/staging/hv/hv_mouse.c
@@
-341,6
+341,8
@@
static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
/* Save the report desc */
input_device->report_desc_size = desc->desc[0].wDescriptorLength;
+ if (input_device->report_desc_size == 0)
+ goto cleanup;
input_device->report_desc = kzalloc(input_device->report_desc_size,
GFP_ATOMIC);