diff options
author | bala <balanatarajan@users.noreply.github.com> | 2001-08-24 15:20:03 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2001-08-24 15:20:03 +0000 |
commit | 8242a1aa572db649f66000ee8508b761c506a089 (patch) | |
tree | e0a0f16cd7668c1b112f6f8bbe0c7b95c0eea5b2 | |
parent | 930a565a52c0c09165ad00a5a8c4d60153e6af78 (diff) | |
download | ATCD-8242a1aa572db649f66000ee8508b761c506a089.tar.gz |
ChangeLogTag: Fri Aug 24 10:17:00 2001 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 7 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 7 | ||||
-rw-r--r-- | ace/Log_Msg.cpp | 10 |
4 files changed, 29 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index e7dd81c005a..30b48b0e8db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Aug 24 10:17:00 2001 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Log_Msg.cpp (log_hexdump): Added a patch provided by Massimo + Pichini <massimo@webbridges.it>. This prevents overflows with + long strings that are used in printing hexdumps. Previously we + had a buffer of 80 bytes on the stack. + Fri Aug 24 10:03:29 2001 Steve Huston <shuston@riverace.com> * ace/INET_Addr.(h cpp): Applied changes submitted by diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index e7dd81c005a..30b48b0e8db 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,10 @@ +Fri Aug 24 10:17:00 2001 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Log_Msg.cpp (log_hexdump): Added a patch provided by Massimo + Pichini <massimo@webbridges.it>. This prevents overflows with + long strings that are used in printing hexdumps. Previously we + had a buffer of 80 bytes on the stack. + Fri Aug 24 10:03:29 2001 Steve Huston <shuston@riverace.com> * ace/INET_Addr.(h cpp): Applied changes submitted by diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index e7dd81c005a..30b48b0e8db 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,10 @@ +Fri Aug 24 10:17:00 2001 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Log_Msg.cpp (log_hexdump): Added a patch provided by Massimo + Pichini <massimo@webbridges.it>. This prevents overflows with + long strings that are used in printing hexdumps. Previously we + had a buffer of 80 bytes on the stack. + Fri Aug 24 10:03:29 2001 Steve Huston <shuston@riverace.com> * ace/INET_Addr.(h cpp): Applied changes submitted by diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index 61b4c89c5e3..404484531ee 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -1623,14 +1623,18 @@ ACE_Log_Msg::log_hexdump (ACE_Log_Priority log_priority, ACE_Log_Record::VERBOSE_LEN - 58]; // 58 for the HEXDUMP header; - ACE_TCHAR msg_buf[80]; + ACE_TCHAR *msg_buf; + size_t text_sz = text ? ACE_OS::strlen(text) : 0; + ACE_NEW_RETURN (msg_buf, + ACE_TCHAR[text_sz + 58], + -1); buf[0] = 0; // in case size = 0 int len = ACE::format_hexdump (buffer, size, buf, - sizeof (buf) / sizeof (ACE_TCHAR)); + sizeof (buf) / sizeof (ACE_TCHAR) - text_sz); int sz = 0; @@ -1653,6 +1657,8 @@ ACE_Log_Msg::log_hexdump (ACE_Log_Priority log_priority, ACE_LIB_TEXT ("%s\n%s"), msg_buf, buf); + + delete msg_buf; return 0; } |