]> sigrok.org Git - libsigrok.git/commit - src/input/vcd.c
input/vcd: abort VCD import when timestamp counts backwards
authorGerhard Sittig <redacted>
Sat, 21 Jul 2018 20:30:05 +0000 (22:30 +0200)
committerUwe Hermann <redacted>
Sun, 22 Jul 2018 14:15:26 +0000 (16:15 +0200)
commited367d68203593224af3c9593cfef0662b56007c
tree335cab18cb74c87afcdf1dbe36eb9165c2f4a73a
parente6104296c29f31e812c964da53093bdc6292efcd
input/vcd: abort VCD import when timestamp counts backwards

The VCD specification requests that timestamps will strictly increase as
one advances through the file. Add another check where the previous
implementation resulted in a tight loop and made the application stall.
Do print an error message and abort file processing in that case.

This fixes bug #1250.
src/input/vcd.c