[asterisk-commits] ast bt get symbols: Prevent double-free. (asterisk[15])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Oct 15 14:42:11 CDT 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6796 )
Change subject: ast_bt_get_symbols: Prevent double-free.
......................................................................
ast_bt_get_symbols: Prevent double-free.
It's possible for bfdobj to be created but syms not created. If syms
was not allocated in the current loop iteration but was allocated in the
previous iteration it would crash.
ASTERISK-27340
Change-Id: I5b110c609f6dfe91339f782a99a431bca5837363
---
M main/backtrace.c
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Richard Mudgett: Looks good to me, approved
Joshua Colp: Approved for Submit
diff --git a/main/backtrace.c b/main/backtrace.c
index 0b29385..aed4ffd 100644
--- a/main/backtrace.c
+++ b/main/backtrace.c
@@ -172,6 +172,7 @@
if (bfdobj) {
bfd_close(bfdobj);
ast_std_free(syms);
+ syms = NULL;
}
/* Default output, if we cannot find the information within BFD */
--
To view, visit https://gerrit.asterisk.org/6796
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I5b110c609f6dfe91339f782a99a431bca5837363
Gerrit-Change-Number: 6796
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20171015/445485ea/attachment-0001.html>
More information about the asterisk-commits
mailing list