diff options
author | Li Jun <[email protected]> | 2021-06-18 16:28:58 +0800 |
---|---|---|
committer | Peter Chen <[email protected]> | 2021-08-21 13:15:25 +0800 |
commit | e5d6a7c6cfae9e714a0e8ff64facd1ac68a784c6 (patch) | |
tree | d64fb0832cbc8798ba198927cf143850e38ad6ac /tools/perf/scripts | |
parent | e4788edc730a0d2b26e1ae1f08fbb3f635b92dbb (diff) |
usb: chipidea: host: fix port index underflow and UBSAN complains
If wIndex is 0 (and it often is), these calculations underflow and
UBSAN complains, here resolve this by not decrementing the index when
it is equal to 0, this copies the solution from commit 85e3990bea49
("USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN")
Reported-by: Zhipeng Wang <[email protected]>
Signed-off-by: Li Jun <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Chen <[email protected]>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions