]> sigrok.org Git - libsigrok.git/commit - src/hardware/hantek-6xxx/api.c
hantek-6xxx: Ignore requests to set Hantek 6022BE coupling.
authorErik Montnemery <redacted>
Thu, 18 Aug 2016 21:05:11 +0000 (23:05 +0200)
committerUwe Hermann <redacted>
Sun, 21 Aug 2016 16:54:15 +0000 (18:54 +0200)
commit817b7441a1f31788a53f39af7c2f1e08f9de25b2
treede55144eb7cadbec217dd4c8fa0a65eab21284d7
parent7f46b27ef2cefa9baf1ef8fdcf547451e85dc702
hantek-6xxx: Ignore requests to set Hantek 6022BE coupling.

Here's a patch to "Ignore requests to set coupling for the Hantek 6022BE",
this clears the LIBUSB errors for me.

Also in the patch:

 - There is a crash because config_list() can be called with sdi == NULL.

   This can be reproduced by doing:
     "sigrok-cli.exe --driver hantek-6xxx --show"

 - There seems to be a very unsafe loop in config_set() when setting COUPLING;
   the coupling vector is assumed to be zero terminated, but is not declared
   as such.

   Note: The same issue is present also for other hardware, at least for
   hantek-dso/api.c. The patch is only for hantek-6xxx though.
src/hardware/hantek-6xxx/api.c
src/hardware/hantek-6xxx/protocol.c
src/hardware/hantek-6xxx/protocol.h