]> sigrok.org Git - libsigrok.git/commitdiff
session_driver: avoid division by zero, catch API violation
authorGerhard Sittig <redacted>
Thu, 8 Feb 2018 21:18:02 +0000 (22:18 +0100)
committerUwe Hermann <redacted>
Fri, 9 Feb 2018 20:34:09 +0000 (21:34 +0100)
Avoid a division by zero, by not using a zero unitsize in a modulo
operation. As a byproduct, avoid processing and counting input that
neither has analog nor logic data. This should never have happened,
but the change now catches the error if invalid input is seen.

This was reported by clang's scan-build.


No differences found