diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hid-logitech-hidpp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 4d72c20..4292cc3 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -313,6 +313,9 @@ static char *hidpp_get_unifying_name(struct hidpp_device *hidpp_dev) len = response.rap.params[1]; + if (2 + len > sizeof(response.rap.params)) + return NULL; + name = kzalloc(len + 1, GFP_KERNEL); if (!name) return NULL; |