]> sigrok.org Git - libsigrok.git/commit
scpi_usbtmc_libusb: Check that bulk in requests read the entire header
authorAndy Lutomirski <redacted>
Sat, 13 Jun 2020 22:32:36 +0000 (15:32 -0700)
committerUwe Hermann <redacted>
Wed, 24 Jun 2020 22:03:24 +0000 (00:03 +0200)
commite2283318c1f34cd9a1933b88aef1b93f9782cf11
tree505e370544e147c5db1ad6a5d5ca902fb8f39d51
parent69990295852d658346980f3aad5e52ff0271bcd9
scpi_usbtmc_libusb: Check that bulk in requests read the entire header

The Rigol DS1054Z sometimes returns zero bytes in response to a bulk in
request.  sigrok ends up reading out of bounds and failing ungracefully
when this happens.  Check that libusb returned a full USBTMC header and
fail gracefully if it did not.
src/scpi/scpi_usbtmc_libusb.c