diff options
author | David Goulet <dgoulet@torproject.org> | 2020-07-09 07:25:26 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-09 07:25:26 -0400 |
commit | d7f3d1196c7bf962125fdc165492623c12359679 (patch) | |
tree | 3d39581d56a2975e8758d2fe99879e6a65e30be3 /src/test | |
parent | e4bfa734a60555a1871a008c2a125fe55d564aa1 (diff) | |
parent | 562957e0db200ea58fcf878d61314d3a2b0c297c (diff) | |
download | tor-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.c | 8 |
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: ; } |