1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-03 17:11:32 +00:00

Fix a buffer overflow iff USB_DEBUG is set, hw.usb.ums.debug is > 5 and the

total size of all input reports is < 6.

PR:		usb/106435
Submitted by:	Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Approved by:	emax (mentor)
MFC after:	3 days
This commit is contained in:
Markus Brueffer 2007-01-17 03:50:45 +00:00
parent 875d25860a
commit 740ae2a34c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166068

View File

@ -431,9 +431,10 @@ ums_intr(xfer, addr, status)
#define UMS_BUT(i) ((i) < 3 ? (((i) + 2) % 3) : (i))
DPRINTFN(5, ("ums_intr: sc=%p status=%d\n", sc, status));
DPRINTFN(5, ("ums_intr: data = %02x %02x %02x %02x %02x %02x\n",
sc->sc_ibuf[0], sc->sc_ibuf[1], sc->sc_ibuf[2],
sc->sc_ibuf[3], sc->sc_ibuf[4], sc->sc_ibuf[5]));
DPRINTFN(5, ("ums_intr: data ="));
for (i = 0; i < sc->sc_isize; i++)
DPRINTFN(5, (" %02x", sc->sc_ibuf[i]));
DPRINTFN(5, ("\n"));
if (status == USBD_CANCELLED)
return;