summaryrefslogtreecommitdiff
path: root/src/test/test_dir.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-29 14:04:57 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-29 14:09:57 -0500
commitbd630a899a1ff7658a0c52327fa3cce59e7213b4 (patch)
tree15ba81763548e6a6382e444bc57aff67abf80f6f /src/test/test_dir.c
parentf935ee2dae5ca026a6bf81cc403bc50ae92bdd70 (diff)
downloadtor-bd630a899a1ff7658a0c52327fa3cce59e7213b4.tar.gz
tor-bd630a899a1ff7658a0c52327fa3cce59e7213b4.zip
Correctly reject packages lines with empty entries
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r--src/test/test_dir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 7d3d41401d..efc3ec7940 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -2961,6 +2961,13 @@ test_dir_packages(void *arg)
BAD("tor ");
BAD("tor");
BAD("");
+ BAD("=foobar sha256="
+ "3c179f46ca77069a6a0bac70212a9b3b838b2f66129cb52d568837fc79d8fcc7");
+ BAD("= = sha256="
+ "3c179f46ca77069a6a0bac70212a9b3b838b2f66129cb52d568837fc79d8fcc7");
+
+ BAD("sha512= sha256="
+ "3c179f46ca77069a6a0bac70212a9b3b838b2f66129cb52d568837fc79d8fcc7");
votes = smartlist_new();
smartlist_add(votes, tor_malloc_zero(sizeof(networkstatus_t)));