diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-01-22 11:48:24 -0600 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-01-22 12:35:56 -0600 |
commit | 7866806fc3bbb716064fb9e4e0a1436e3325a637 (patch) | |
tree | c06d92244c08c876f97e0d8e94ca37b12c6b89c9 /main | |
parent | 60a15fe4365d1bd47c19836fc9addde15c1f0167 (diff) |
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
Diffstat (limited to 'main')
-rw-r--r-- | main/logger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/logger.c b/main/logger.c index fac68d9b6..13f6de890 100644 --- a/main/logger.c +++ b/main/logger.c @@ -601,7 +601,7 @@ static int init_logger_chain(const char *altconf) /* 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; } |