aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-07-09 07:25:26 -0400
committerDavid Goulet <dgoulet@torproject.org>2020-07-09 07:25:26 -0400
commitd7f3d1196c7bf962125fdc165492623c12359679 (patch)
tree3d39581d56a2975e8758d2fe99879e6a65e30be3 /src/test
parente4bfa734a60555a1871a008c2a125fe55d564aa1 (diff)
parent562957e0db200ea58fcf878d61314d3a2b0c297c (diff)
downloadtor-d7f3d1196c7bf962125fdc165492623c12359679.tar.gz
tor-d7f3d1196c7bf962125fdc165492623c12359679.zip
Merge branch 'maint-0.4.4'
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_hs_common.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index 4a161db334..9202074e25 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -792,6 +792,8 @@ test_parse_extended_hostname(void *arg)
"www.25njqamcweflpvkl73j4szahhihoc4xt3ktcgjnpaingr5yhkenl5sid.onion";
char address9[] =
"www.15njqamcweflpvkl73j4szahhihoc4xt3ktcgjnpaingr5yhkenl5sid.onion";
+ char address10[] =
+ "15njqamcweflpvkl73j4szahhihoc4xt3ktcgjnpaingr5yhkenl5sid7jdl.onion";
tt_assert(!parse_extended_hostname(address1, &type));
tt_int_op(type, OP_EQ, BAD_HOSTNAME);
@@ -824,7 +826,11 @@ test_parse_extended_hostname(void *arg)
/* Invalid v3 address. */
tt_assert(!parse_extended_hostname(address9, &type));
- tt_int_op(type, OP_EQ, ONION_V3_HOSTNAME);
+ tt_int_op(type, OP_EQ, BAD_HOSTNAME);
+
+ /* Invalid v3 address: too long */
+ tt_assert(!parse_extended_hostname(address10, &type));
+ tt_int_op(type, OP_EQ, BAD_HOSTNAME);
done: ;
}