mirror of https://gitee.com/openkylin/linux.git
264e989a0b
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> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
airport.c | ||
cfg.c | ||
cfg.h | ||
fw.c | ||
fw.h | ||
hermes.c | ||
hermes.h | ||
hermes_dld.c | ||
hermes_dld.h | ||
hermes_rid.h | ||
hw.c | ||
hw.h | ||
main.c | ||
main.h | ||
mic.c | ||
mic.h | ||
orinoco.h | ||
orinoco_cs.c | ||
orinoco_nortel.c | ||
orinoco_pci.c | ||
orinoco_pci.h | ||
orinoco_plx.c | ||
orinoco_tmd.c | ||
orinoco_usb.c | ||
scan.c | ||
scan.h | ||
spectrum_cs.c | ||
wext.c | ||
wext.h |