From 90b88d6480a4ce03f257ef864e9e2aa3ab854c7a Mon Sep 17 00:00:00 2001 From: Like Ma Date: Mon, 1 Nov 2021 15:21:17 +0800 Subject: [PATCH 1/3] Fix assigning not null-terminated string. --- ACE/ace/Configuration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/Configuration.cpp b/ACE/ace/Configuration.cpp index 880ed6e8d4125..c9a07763d1350 100644 --- a/ACE/ace/Configuration.cpp +++ b/ACE/ace/Configuration.cpp @@ -780,7 +780,7 @@ ACE_Configuration_Win32Registry::get_string_value (const ACE_Configuration_Secti return -1; } - value = buffer.get (); + value.set (buffer.get (), buffer_length, true); return 0; } From da7746f8bff4b0e39b8bdf83362c0c4d0f0a42d2 Mon Sep 17 00:00:00 2001 From: Like Ma Date: Thu, 18 Jul 2024 22:29:04 +0800 Subject: [PATCH 2/3] Reset FILE* Log_Msg::ostream_ --- ACE/ace/Log_Msg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index 570711e99dc11..4560badaffe72 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -753,8 +753,8 @@ ACE_Log_Msg::cleanup_ostream () ACE_OS::fclose (this->ostream_); #else delete this->ostream_; - this->ostream_ = 0; #endif + this->ostream_ = 0; } this->ostream_refcount_ = 0; } From 53a0ae2bc68e0c5a68a71dac599287118e0cb2d1 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 31 Jan 2025 15:49:23 +0100 Subject: [PATCH 3/3] Use nullptr with ostream_ * ACE/ace/Log_Msg.cpp: --- ACE/ace/Log_Msg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ACE/ace/Log_Msg.cpp b/ACE/ace/Log_Msg.cpp index 4560badaffe72..1abe5c7e0b3c8 100644 --- a/ACE/ace/Log_Msg.cpp +++ b/ACE/ace/Log_Msg.cpp @@ -621,7 +621,7 @@ ACE_Log_Msg::ACE_Log_Msg () linenum_ (0), msg_ (0), restart_ (1), // Restart by default... - ostream_ (0), + ostream_ (nullptr), ostream_refcount_ (0), msg_callback_ (0), trace_depth_ (0), @@ -754,7 +754,7 @@ ACE_Log_Msg::cleanup_ostream () #else delete this->ostream_; #endif - this->ostream_ = 0; + this->ostream_ = nullptr; } this->ostream_refcount_ = 0; }