summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-07-05 13:41:27 -0400
committerNick Mathewson <nickm@torproject.org>2017-07-05 13:41:27 -0400
commit0ee15c92d5486fc73ba49dea7f12bf2f89012cfb (patch)
tree929eb2a05c3523bf4f3b5ba61c2918543e0e3764 /src/test
parentd56f6993990ab75b6ab8a80027ee60e610489a2c (diff)
parentbb3f74e66bd9df94ce9d1949164348efac728ea9 (diff)
downloadtor-0ee15c92d5486fc73ba49dea7f12bf2f89012cfb.tar.gz
tor-0ee15c92d5486fc73ba49dea7f12bf2f89012cfb.zip
Merge branch 'bug22789_024' into maint-0.2.4
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_addr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/test_addr.c b/src/test/test_addr.c
index fec85a4696..645fc643db 100644
--- a/src/test/test_addr.c
+++ b/src/test/test_addr.c
@@ -340,6 +340,15 @@ test_addr_ip6_helpers(void)
test_pton6_bad("a:::b:c");
test_pton6_bad(":::a:b:c");
test_pton6_bad("a:b:c:::");
+ /* Regression tests for 22789. */
+ test_pton6_bad("0xfoo");
+ test_pton6_bad("0x88");
+ test_pton6_bad("0xyxxy");
+ test_pton6_bad("0XFOO");
+ test_pton6_bad("0X88");
+ test_pton6_bad("0XYXXY");
+ test_pton6_bad("0x");
+ test_pton6_bad("0X");
/* test internal checking */
test_external_ip("fbff:ffff::2:7", 0);