summaryrefslogtreecommitdiff
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
parent930a565a52c0c09165ad00a5a8c4d60153e6af78 (diff)
downloadATCD-8242a1aa572db649f66000ee8508b761c506a089.tar.gz
ChangeLogTag: Fri Aug 24 10:17:00 2001 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLogs/ChangeLog-02a7
-rw-r--r--ChangeLogs/ChangeLog-03a7
-rw-r--r--ace/Log_Msg.cpp10
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;
}