diff options
Diffstat (limited to 'src/feature/dirparse/policy_parse.c')
-rw-r--r-- | src/feature/dirparse/policy_parse.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/feature/dirparse/policy_parse.c b/src/feature/dirparse/policy_parse.c index 28cd174686..8d30410f58 100644 --- a/src/feature/dirparse/policy_parse.c +++ b/src/feature/dirparse/policy_parse.c @@ -1,7 +1,7 @@ /* Copyright (c) 2001 Matej Pfajfar. * Copyright (c) 2001-2004, Roger Dingledine. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. - * Copyright (c) 2007-2020, The Tor Project, Inc. */ + * Copyright (c) 2007-2021, The Tor Project, Inc. */ /* See LICENSE for licensing information */ /** @@ -192,6 +192,10 @@ router_parse_addr_policy_private(directory_token_t *tok) uint16_t port_min, port_max; addr_policy_t result; + /* Safeguard: always flag non canonical because it is a stack allocated + * object and thus should not be considered a copy stored in a map. */ + result.is_canonical = 0; + arg = tok->args[0]; if (strcmpstart(arg, "private")) return NULL; |