usb-host: add range checks for usb-host parameters
Hi,
usb patch queue is pretty short too, with a
single patch adding ubs-host parameter checks.
please pull,
Gerd
The following changes since commit 2a2c4830c0068d70443f3dddc4cc668f0c601b5c:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20140611-1' into staging (2014-06-12 09:51:41 +0100)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-usb-20140613-1
for you to fetch changes up to f3cda6e060c483dee1fa497699fd5f972e5031da:
usb-host: add range checks for usb-host parameters (2014-06-13 12:34:57 +0200)
----------------------------------------------------------------
usb-host: add range checks for usb-host parameters
----------------------------------------------------------------
Gerd Hoffmann (1):
usb-host: add range checks for usb-host parameters
hw/usb/host-libusb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
--- hw/usb/host-libusb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
hw/usb/host-libusb.c +13 -0
@@ -952,6 +952,19 @@ static int usb_host_initfn(USBDevice *udev) {USBHostDevice *s =USB_HOST_DEVICE (udev); +if (s->match.vendor_id >0xffff ) { +error_report ("vendorid out of range" ); +return -1 ; + } +if (s->match.product_id >0xffff ) { +error_report ("productid out of range" ); +return -1 ; + } +if (s->match.addr >127 ) { +error_report ("hostaddr out of range" ); +return -1 ; + } + loglevel = s->loglevel; udev->flags |= (1 <<USB_DEV_FLAG_IS_HOST ); udev->auto_attach =0 ;
Signature · 1 line
1.8.3.1
Peter Maydell
AppliedQuoted 24 lines · Gerd Hoffmann
Hi,
usb patch queue is pretty short too, with a
single patch adding ubs-host parameter checks.please pull,
GerdThe following changes since commit
2a2c4830c0068d70443f3dddc4cc668f0c601b5c:Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20140611-1' into staging (2014-06-12 09:51:41 +0100)
are available in the git repository at:
git://git.kraxel.org/qemutags/pull-usb-20140613-1for you to fetch changes up to
f3cda6e060c483dee1fa497699fd5f972e5031da:usb-host: add range checks for usb-host parameters (2014-06-13 12:34:57 +0200)
----------------------------------------------------------------
usb-host: add range checks for usb-host parameters
Quoted 7 lines
----------------------------------------------------------------
Gerd Hoffmann (1):
usb-host: add range checks for usb-host parametershw/usb/host-libusb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Applied, thanks.
-- PMM