aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_protover.c
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2018-08-17 22:45:33 +0000
committercypherpunks <cypherpunks@torproject.org>2020-02-09 01:24:47 +0000
commit32b33c0d21ce471d735abbedc26d26998238c380 (patch)
tree0a07cd6f007812c6f22422ad4d3894d77c00fc04 /src/test/test_protover.c
parentc2b95da4d49504281f7c30c8f523cd492be932a7 (diff)
downloadtor-32b33c0d21ce471d735abbedc26d26998238c380.tar.gz
tor-32b33c0d21ce471d735abbedc26d26998238c380.zip
protover: reject unexpected commas
Consistently reject extra commas, instead of only rejecting leading commas. Fix on b2b2e1c7f24d9b65059e3d089768d6c49ba4f58f. Fixes #27194; bugfix on 0.2.9.4-alpha.
Diffstat (limited to 'src/test/test_protover.c')
-rw-r--r--src/test/test_protover.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_protover.c b/src/test/test_protover.c
index 63c508bd13..664576f625 100644
--- a/src/test/test_protover.c
+++ b/src/test/test_protover.c
@@ -572,6 +572,10 @@ test_protover_vote_roundtrip(void *args)
{ "N-1=1,2", "N-1=1-2" },
{ "-1=4294967295", NULL },
{ "-1=3", "-1=3" },
+ { "Foo=,", NULL },
+ { "Foo=,1", NULL },
+ { "Foo=1,,3", NULL },
+ { "Foo=1,3,", NULL },
/* junk. */
{ "!!3@*", NULL },
/* Missing equals sign */