Messages in this thread Patch in this message | | | Subject | [PATCH 47/47] Check the range for HIDIOC?USAGES num_values. | Date | Thu, 29 Jul 2004 16:09:56 +0200 | From | Vojtech Pavlik <> |
| |
You can pull this changeset from: bk://kernel.bkbits.net/vojtech/input
===================================================================
ChangeSet@1.1859, 2004-07-29 14:13:12+02:00, vojtech@suse.cz input: Check the range for HIDIOC?USAGES num_values. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
hiddev.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-)
===================================================================
diff -Nru a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c --- a/drivers/usb/input/hiddev.c Thu Jul 29 14:38:23 2004 +++ b/drivers/usb/input/hiddev.c Thu Jul 29 14:38:23 2004 @@ -633,14 +633,11 @@ } else if (uref->usage_index >= field->report_count) goto inval; - else if ((cmd == HIDIOCGUSAGES || - cmd == HIDIOCSUSAGES) && - (uref->usage_index + uref_multi->num_values >= - field->report_count || - uref->usage_index + uref_multi->num_values < - uref->usage_index)) + else if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) && + (uref_multi->num_values >= HID_MAX_MULTI_USAGES || + uref->usage_index + uref_multi->num_values >= field->report_count || + uref->usage_index + uref_multi->num_values < uref->usage_index)) goto inval; - } switch (cmd) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |