From: Bert Vermeulen Date: Tue, 26 Nov 2013 21:20:30 +0000 (+0100) Subject: Don't accept over 64 probes. X-Git-Tag: libsigrok-0.3.0~528 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6c57446d415dfb21bea448513bd61a17867a64f8;p=libsigrok.git Don't accept over 64 probes. The code is limited to 64 probes for now, so don't accept setting the probe limit to higher than that. See bug 194. --- diff --git a/input/vcd.c b/input/vcd.c index 5bd7c24b..b10da20b 100644 --- a/input/vcd.c +++ b/input/vcd.c @@ -318,6 +318,9 @@ static int init(struct sr_input *in, const char *filename) if (num_probes < 1) { release_context(ctx); return SR_ERR; + } else if (num_probes > 64) { + sr_err("No more than 64 probes supported."); + return SR_ERR; } }