diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-10-02 11:32:34 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-19 15:53:04 -0400 |
commit | 264e989a0b347c61bd3258063eac8b86f55ff037 (patch) | |
tree | e874e2c843d2ef13f26c67448c62181620557f2f /mm | |
parent | 2b4766c3008aa99a60415a6f321ac0dad94852f1 (diff) | |
download | linux-3.10-264e989a0b347c61bd3258063eac8b86f55ff037.tar.gz linux-3.10-264e989a0b347c61bd3258063eac8b86f55ff037.tar.bz2 linux-3.10-264e989a0b347c61bd3258063eac8b86f55ff037.zip |
orinoco_usb: clean up some signedness issues
In ezusb_read_ltv() we had a comparison "(bufsize < 0)" which was never
true because bufsize was unsigned. I looked at the implications of
that. If we passed a negative number to ezusb_access_ltv() then it
would be used as the size parameter of the memcpy() because that
function uses min_t(int, exp_len, ans_size).
But fortunately when I looked at the callers, bufsize is not controlled
by the user and it's never negative. So these signedness mistakes have
no impact.
I removed the always false check from ezusb_read_ltv() and I changed the
types in ezusb_access_ltv() and made the variables unsigned.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions