]> sigrok.org Git - libsigrok.git/commitdiff
Don't accept over 64 probes.
authorBert Vermeulen <redacted>
Tue, 26 Nov 2013 21:20:30 +0000 (22:20 +0100)
committerBert Vermeulen <redacted>
Tue, 26 Nov 2013 21:23:38 +0000 (22:23 +0100)
The code is limited to 64 probes for now, so don't accept setting
the probe limit to higher than that.

See bug 194.

input/vcd.c

index 5bd7c24bec425a1feb9da6d4a7a10d1d14c86a3f..b10da20be90fcc2667a68092f829a44ba8c54f52 100644 (file)
@@ -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;
                        }
                }