[asterisk-commits] logger.c: Fix buffer overrun found by address sanitizer. (asterisk[11])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 22 14:57:48 CST 2016
Matt Jordan has submitted this change and it was merged.
Change subject: logger.c: Fix buffer overrun found by address sanitizer.
......................................................................
logger.c: Fix buffer overrun found by address sanitizer.
The null terminator of the tail struct member was not being allocated
when no logger.conf config file is installed.
ASTERISK-25714 #close
Reported by: Badalian Vyacheslav
Change-Id: I45770fdd08af39506a3bc33ba279c4f16e047a30
---
M main/logger.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Matt Jordan: Looks good to me, approved
diff --git a/main/logger.c b/main/logger.c
index 795c85d..aeb0732 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -408,7 +408,7 @@
/* If no config file, we're fine, set default options. */
if (!cfg) {
- if (!(chan = ast_calloc(1, sizeof(*chan)))) {
+ if (!(chan = ast_calloc(1, sizeof(*chan) + 1))) {
fprintf(stderr, "Failed to initialize default logging\n");
return -1;
}
--
To view, visit https://gerrit.asterisk.org/2069
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I45770fdd08af39506a3bc33ba279c4f16e047a30
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-commits
mailing list