diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-03-02 19:57:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 19:57:42 +0100 |
commit | 132c6df724b3f4d82ade1b6a73fd86d4c240bb20 (patch) | |
tree | 64758b1985be5423dbd928c6829858bc6eefb7ce | |
parent | fe8bdb83f29f0b520a5a9be872c51d2b4f5726b2 (diff) | |
parent | 45df27f3869f66d895964f18a582136bb44333af (diff) | |
download | ATCD-132c6df724b3f4d82ade1b6a73fd86d4c240bb20.tar.gz |
Merge pull request #585 from louishust/log_abort
Bugfix: ACE abort when use %l and the msg len exceed ACE_MAXLOGMSGLEN
-rw-r--r-- | ACE/ace/Log_Msg.cpp | 1 | ||||
-rw-r--r-- | ACE/tests/Log_Msg_Test.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index 09b43632575..cc5cf7107a2 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -1256,6 +1256,7 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, this->linenum ()); else this_len = ACE_OS::sprintf (bp, format, this->linenum ()); + ACE_UPDATE_COUNT (bspace, this_len); break; case 'N': // Source file name diff --git a/ACE/tests/Log_Msg_Test.cpp b/ACE/tests/Log_Msg_Test.cpp index 0b489116694..b0f31ddf21a 100644 --- a/ACE/tests/Log_Msg_Test.cpp +++ b/ACE/tests/Log_Msg_Test.cpp @@ -246,7 +246,7 @@ test_log_msg_features (const ACE_TCHAR *program) big[index] = alphabet[i % j]; } big[ACE_Log_Record::MAXLOGMSGLEN] = ACE_TEXT ('\0'); - ACE_DEBUG ((LM_INFO, ACE_TEXT ("This is too big: %s\n"), big)); + ACE_DEBUG ((LM_INFO, ACE_TEXT ("This is too big:%l %s\n"), big)); ACE_HEX_DUMP((LM_INFO, (const char*)big, ACE_Log_Record::MAXLOGMSGLEN )); |