[asterisk-commits] Prevent Undefined Capath Crash (asterisk[14])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 11 11:47:32 CDT 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5584 )
Change subject: Prevent Undefined Capath Crash
......................................................................
Prevent Undefined Capath Crash
It is possible to initialize a valid config without a capath
or cafile definition. This will cause a crash on a reload.
This fix ensures capath is always allocated.
ASTERISK-26983 #close
Change-Id: I63ff715d9d9023427543a5b8a4ba7b0d82533c12
---
M main/manager.c
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
George Joseph: Looks good to me, approved
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
diff --git a/main/manager.c b/main/manager.c
index c3628a3..6604f6f 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -8765,6 +8765,10 @@
ami_tls_cfg.pvtfile = NULL;
ast_free(ami_tls_cfg.cipher);
ami_tls_cfg.cipher = NULL;
+ ast_free(ami_tls_cfg.cafile);
+ ami_tls_cfg.cafile = NULL;
+ ast_free(ami_tls_cfg.capath);
+ ami_tls_cfg.capath = NULL;
ao2_global_obj_release(mgr_sessions);
@@ -8865,6 +8869,10 @@
ami_tls_cfg.pvtfile = ast_strdup("");
ast_free(ami_tls_cfg.cipher);
ami_tls_cfg.cipher = ast_strdup("");
+ ast_free(ami_tls_cfg.cafile);
+ ami_tls_cfg.cafile = ast_strdup("");
+ ast_free(ami_tls_cfg.capath);
+ ami_tls_cfg.capath = ast_strdup("");
}
static int __init_manager(int reload, int by_external_config)
--
To view, visit https://gerrit.asterisk.org/5584
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I63ff715d9d9023427543a5b8a4ba7b0d82533c12
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Joshua Elson <joshelson at gmail.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-commits
mailing list