"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "drivers/hid/usbhid/hiddev.c" between
linux-3.16.62.tar.xz and linux-3.16.63.tar.xz

About: The full source of the Linux kernel 3.16.x (longterm stable)

hiddev.c  (linux-3.16.62.tar.xz):hiddev.c  (linux-3.16.63.tar.xz)
skipping to change at line 522 skipping to change at line 522
if (uref->field_index >= report->maxfield) if (uref->field_index >= report->maxfield)
goto inval; goto inval;
uref->field_index = array_index_nospec(uref->field_index, uref->field_index = array_index_nospec(uref->field_index,
report->maxfield); report->maxfield);
field = report->field[uref->field_index]; field = report->field[uref->field_index];
if (cmd == HIDIOCGCOLLECTIONINDEX) { if (cmd == HIDIOCGCOLLECTIONINDEX) {
if (uref->usage_index >= field->maxusage) if (uref->usage_index >= field->maxusage)
goto inval; goto inval;
uref->usage_index =
array_index_nospec(uref->usage_index,
field->maxusage);
} else if (uref->usage_index >= field->report_count) } else if (uref->usage_index >= field->report_count)
goto inval; goto inval;
} }
if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) && if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) {
(uref_multi->num_values > HID_MAX_MULTI_USAGES || if (uref_multi->num_values > HID_MAX_MULTI_USAGES ||
uref->usage_index + uref_multi->num_values > field->report_c uref->usage_index + uref_multi->num_values >
ount)) field->report_count)
goto inval; goto inval;
uref->usage_index =
array_index_nospec(uref->usage_index,
field->report_count -
uref_multi->num_values);
}
switch (cmd) { switch (cmd) {
case HIDIOCGUSAGE: case HIDIOCGUSAGE:
uref->value = field->value[uref->usage_index]; uref->value = field->value[uref->usage_index];
if (copy_to_user(user_arg, uref, sizeof(*uref))) if (copy_to_user(user_arg, uref, sizeof(*uref)))
goto fault; goto fault;
goto goodreturn; goto goodreturn;
case HIDIOCSUSAGE: case HIDIOCSUSAGE:
field->value[uref->usage_index] = uref->value; field->value[uref->usage_index] = uref->value;
 End of changes. 2 change blocks. 
5 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)