From bb3f74e66bd9df94ce9d1949164348efac728ea9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 3 Jul 2017 11:20:09 -0400 Subject: Fix assertion failure related to openbsd strtol(). Fixes bug 22789; bugfix on 0.2.3.8-alpha. --- src/test/test_addr.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/test') 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); -- cgit v1.2.3-54-g00ecf