aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirparse/policy_parse.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-12-15 09:00:15 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-12-15 09:00:15 -0500
commitbf10206e9e23ac0ded2cc9727666696ea25d5636 (patch)
treeb5890fbf39d15f15529b33b1ad8d2d2aa128a590 /src/feature/dirparse/policy_parse.c
parent193781e6ef8b1236bfd51eab344abcb0e914e168 (diff)
downloadtor-bf10206e9e23ac0ded2cc9727666696ea25d5636.tar.gz
tor-bf10206e9e23ac0ded2cc9727666696ea25d5636.zip
Fix compiler warnings from ubuntu/jammy
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/dirparse/policy_parse.c')
-rw-r--r--src/feature/dirparse/policy_parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/feature/dirparse/policy_parse.c b/src/feature/dirparse/policy_parse.c
index abf3df36c6..8d30410f58 100644
--- a/src/feature/dirparse/policy_parse.c
+++ b/src/feature/dirparse/policy_parse.c
@@ -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;