summaryrefslogtreecommitdiff
path: root/ace/Log_Msg.cpp
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2001-08-24 15:20:03 +0000
committerbala <balanatarajan@users.noreply.github.com>2001-08-24 15:20:03 +0000
commit8242a1aa572db649f66000ee8508b761c506a089 (patch)
treee0a0f16cd7668c1b112f6f8bbe0c7b95c0eea5b2 /ace/Log_Msg.cpp
parent930a565a52c0c09165ad00a5a8c4d60153e6af78 (diff)
downloadATCD-8242a1aa572db649f66000ee8508b761c506a089.tar.gz
ChangeLogTag: Fri Aug 24 10:17:00 2001 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'ace/Log_Msg.cpp')
-rw-r--r--ace/Log_Msg.cpp10
1 files changed, 8 insertions, 2 deletions
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;
}