Open stellar-liyanbin opened 3 years ago
@kevinrsa I think use '%.*s' instead of '%s' is ok. Please test it, and welcome to pr.
LOG_DEBUG("msgBody is:%.*s, msgBody length is:%d", pBody->getSize(), msg_body, pBody->getSize());
@kevinrsa I think use '%.*s' instead of '%s' is ok. Please test it, and welcome to pr.
LOG_DEBUG("msgBody is:%.*s, msgBody length is:%d", pBody->getSize(), msg_body, pBody->getSize());
Thanks for the suggestion, it work.
This is another valgrind error message, it should be '%d'.
@kevinrsa Yeah. It looks so many issues in the master branch. Could you test the re_dev branch, and give the community some suggestions?
string terminator '\0' should be considered here:
https://github.com/apache/rocketmq-client-cpp/blob/9008c14d9c34a4f0b4a67417000612348157027e/src/common/ClientRPCHook.cpp#L56
I use
valgrind
to run my program, it always prompts the following error. According to the source code, this should be because there is no string terminator\0