diff options
author | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2019-06-08 20:22:57 +0200 |
---|---|---|
committer | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2019-06-08 20:22:57 +0200 |
commit | 4c9cf83a6673f03f4b39d826294e6ab77f8a44fb (patch) | |
tree | 02e0f071a9d50a4624d862070491c87d508db00d | |
parent | e907b2c316ab5261c5acccd08ba8a32d32efd50c (diff) | |
download | embedlog-4c9cf83a6673f03f4b39d826294e6ab77f8a44fb.tar.gz embedlog-4c9cf83a6673f03f4b39d826294e6ab77f8a44fb.tar.bz2 embedlog-4c9cf83a6673f03f4b39d826294e6ab77f8a44fb.zip |
src/el-private.h: add missing ']' to EL_PRE_FUNCINFO_LEN
When funcinfo is being printed, 4 characters are printed beside
function name: [()]. But EL_PRE_FUNCINFO_LEN was configured to
add only 3 characters, which may lead to buffer overflow in corner
cases.
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r-- | src/el-private.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/el-private.h b/src/el-private.h index b85da02..93cc6f5 100644 --- a/src/el-private.h +++ b/src/el-private.h @@ -210,7 +210,7 @@ extern struct el g_el; [source-file.c:1337:foo()] - or if finfo is disabled + or if finfo is disabled. Last +1 is for closing ']' [foo()] @@ -219,7 +219,7 @@ extern struct el g_el; #if ENABLE_FUNCINFO -# define EL_PRE_FUNCINFO_LEN ((EL_FUNCLEN_MAX) + 2 + 1) +# define EL_PRE_FUNCINFO_LEN ((EL_FUNCLEN_MAX) + 2 + 1 + 1) #else # define EL_PRE_FUNCINFO_LEN 0 #endif |