rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ding...@apache.org
Subject [rocketmq-client-cpp] branch master updated: heap-buffer-overflow risk (#241)
Date Sun, 16 Feb 2020 23:48:15 GMT
This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-cpp.git


The following commit(s) were added to refs/heads/master by this push:
     new 11985f3  heap-buffer-overflow risk (#241)
11985f3 is described below

commit 11985f3b0fe59c265ce19d3faea7a85413f99898
Author: WoodsCumming <42297186+WoodsCumming@users.noreply.github.com>
AuthorDate: Mon Feb 17 07:48:08 2020 +0800

    heap-buffer-overflow risk (#241)
---
 src/protocol/CommandHeader.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/protocol/CommandHeader.cpp b/src/protocol/CommandHeader.cpp
index 30dcf59..bc02028 100644
--- a/src/protocol/CommandHeader.cpp
+++ b/src/protocol/CommandHeader.cpp
@@ -511,7 +511,7 @@ void ConsumerSendMsgBackRequestHeader::SetDeclaredFieldOfCommandHeader(map<strin
 void GetConsumerListByGroupResponseBody::Decode(const MemoryBlock* mem, vector<string>&
cids) {
   cids.clear();
   //<! decode;
-  const char* const pData = static_cast<const char*>(mem->getData());
+  const std::string pData(mem->getData(), mem->getSize());
 
   Json::Reader reader;
   Json::Value root;


Mime
View raw message