lineage_android_kernel_xiao.../drivers/usb/misc
Ben Hutchings 1edf322a35 USB: yurex: Check for truncation in yurex_read()
[ Upstream commit 14427b86837a4baf1c121934c6599bdb67dfa9fc ]

snprintf() always returns the full length of the string it could have
printed, even if it was truncated because the buffer was too small.
So in case the counter value is truncated, we will over-read from
in_buffer and over-write to the caller's buffer.

I don't think it's actually possible for this to happen, but in case
truncation occurs, WARN and return -EIO.

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-10 08:53:21 +02:00
..
sisusbvga
Kconfig
Makefile
adutux.c
appledisplay.c
chaoskey.c USB: chaoskey: fix Alea quirk on big-endian hosts 2017-05-25 15:44:38 +02:00
cypress_cy7c63.c
cytherm.c
ehset.c
emi26.c
emi62.c
ezusb.c
ftdi-elan.c
idmouse.c
iowarrior.c USB: iowarrior: fix info ioctl on big-endian hosts 2017-05-25 15:44:40 +02:00
isight_firmware.c
ldusb.c usb: ldusb: add PIDs for new CASSY devices supported by this driver 2018-02-28 10:18:32 +01:00
legousbtower.c
lvstest.c usb: misc: lvs: fix race condition in disconnect handling 2018-03-22 09:17:40 +01:00
rio500.c
rio500_usb.h
trancevibrator.c
ucsi.c
ucsi.h
usb3503.c usb: misc: usb3503: make sure reset is low for at least 100us 2018-01-17 09:38:55 +01:00
usb4604.c
usb_u132.h
usblcd.c
usbsevseg.c
usbtest.c usb: usbtest: fix NULL pointer dereference 2017-11-18 11:22:24 +01:00
uss720.c usb: misc: uss720: Fix two sleep-in-atomic-context bugs 2018-09-26 08:36:36 +02:00
yurex.c USB: yurex: Check for truncation in yurex_read() 2018-10-10 08:53:21 +02:00