Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Issue 656583003: Fix type truncation warnings in HID code. (Closed)

Created:
6 years, 2 months ago by Peter Kasting
Modified:
6 years, 2 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix type truncation warnings in HID code. GetShortData() and IOHIDElementGetUsage() both return uint32s, so raise the size of various containing types to uint32. I tried to look in the USB HID spec to see if any of the affected fields here were limited to e.g. <2^16, meaning that it'd be safe to just cast down to the existing uint16s instead, but I couldn't find any limits. BUG=81439 TEST=none Committed: https://crrev.com/4c3b672cc2c1515b7e16cb535e1cd6e69e326607 Cr-Commit-Position: refs/heads/master@{#300201}

Patch Set 1 #

Patch Set 2 : Fix compile #

Patch Set 3 : Review comments #

Patch Set 4 : Fix compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -37 lines) Patch
M device/hid/hid_connection_linux.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M device/hid/hid_connection_unittest.cc View 1 2 2 chunks +5 lines, -4 lines 0 comments Download
M device/hid/hid_connection_win.cc View 1 2 3 3 chunks +5 lines, -4 lines 0 comments Download
M device/hid/hid_device_info.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M device/hid/hid_report_descriptor.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M device/hid/hid_report_descriptor.cc View 1 2 4 chunks +16 lines, -14 lines 0 comments Download
M device/hid/hid_report_descriptor_unittest.cc View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M device/hid/hid_service_mac.cc View 1 2 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
Peter Kasting
Feel free to push back if this is actually wrong. Even after attempting to peer ...
6 years, 2 months ago (2014-10-13 22:07:02 UTC) #2
Reilly Grant (use Gerrit)
HID usage and usage page IDs are definitely 16-bits. Instead of changing these we should ...
6 years, 2 months ago (2014-10-14 00:19:21 UTC) #3
Peter Kasting
On 2014/10/14 00:19:21, reillyg wrote: > HID usage and usage page IDs are definitely 16-bits. ...
6 years, 2 months ago (2014-10-14 00:27:11 UTC) #4
Peter Kasting
Ping -- I don't know how to proceed here.
6 years, 2 months ago (2014-10-16 01:04:02 UTC) #5
Reilly Grant (use Gerrit)
On 2014/10/14 00:27:11, Peter Kasting wrote: > On 2014/10/14 00:19:21, reillyg wrote: > > HID ...
6 years, 2 months ago (2014-10-17 22:18:33 UTC) #6
Peter Kasting
OK, new version up. Please check that my error-handling in the case of out-of-range usage ...
6 years, 2 months ago (2014-10-18 00:52:04 UTC) #7
Reilly Grant (use Gerrit)
On 2014/10/18 00:52:04, Peter Kasting wrote: > OK, new version up. Please check that my ...
6 years, 2 months ago (2014-10-18 00:55:39 UTC) #8
Peter Kasting
On 2014/10/18 00:55:39, reillyg wrote: > On 2014/10/18 00:52:04, Peter Kasting wrote: > > OK, ...
6 years, 2 months ago (2014-10-18 01:08:28 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/656583003/280001
6 years, 2 months ago (2014-10-18 01:09:23 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/656583003/300001
6 years, 2 months ago (2014-10-18 01:27:30 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:300001)
6 years, 2 months ago (2014-10-18 02:13:10 UTC) #14
commit-bot: I haz the power
6 years, 2 months ago (2014-10-18 02:13:59 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/4c3b672cc2c1515b7e16cb535e1cd6e69e326607
Cr-Commit-Position: refs/heads/master@{#300201}

Powered by Google App Engine
This is Rietveld 408576698