LibSWD icon indicating copy to clipboard operation
LibSWD copied to clipboard

Broken limit tests in example code

Open andrewparlane opened this issue 8 years ago • 1 comments

libswd_drv_openocd.c:57 if (bits<0 && bits>8) return LIBSWD_ERROR_PARAM; this can never be true.

This code exists in a few places, the above is just one example.

Additionally, in the miso case, if this code was fixed to correctly check the range, we would easily hit a failure when reading ACKs (3 bits).

andrewparlane avatar Jun 22 '17 21:06 andrewparlane

TODO

cederom avatar Jun 23 '17 09:06 cederom