aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrinity-1686a <trinity@deuxfleurs.fr>2023-08-05 13:56:57 +0200
committertrinity-1686a <trinity@deuxfleurs.fr>2023-08-05 14:06:56 +0200
commit083fbd5dd810d7022fe1d65e4aa72425a8d5da6c (patch)
tree047734f5e4dff46b5ed9ae364bdfe73acf65e4ea
parent9de1d14c1c14d79d8d3cfa79ac60ff813e90c8e8 (diff)
downloadtor-083fbd5dd810d7022fe1d65e4aa72425a8d5da6c.tar.gz
tor-083fbd5dd810d7022fe1d65e4aa72425a8d5da6c.zip
handle invalid exitpolicy when reapplying it
-rw-r--r--src/core/or/connection_edge.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 9466446ab1..900d639959 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -4282,7 +4282,10 @@ connection_reapply_exit_policy(config_line_t *changes)
// descriptor, which is regenerated asynchronously, so we have to parse the
// policy ourselves.
// We don't verify for our own IP, it's not part of the configuration.
- policies_parse_exit_policy_from_options(get_options(), NULL, NULL, &policy);
+ if (BUG(policies_parse_exit_policy_from_options(get_options(), NULL, NULL,
+ &policy) != 0)) {
+ return;
+ }
conn_list = connection_list_by_type_purpose(CONN_TYPE_EXIT,
EXIT_PURPOSE_CONNECT);