|
|
@@ -366,7 +366,7 @@ std::pair<unsigned long, ErrMsgStruct> getErrMsgByRemark(std::string srcMsg)
|
|
|
{
|
|
|
const std::string headerStr = "UserError=";
|
|
|
if (srcMsg.find(headerStr) != 0)
|
|
|
- return std::make_pair(0, ErrMsgStruct("", srcMsg, ""));
|
|
|
+ return std::make_pair(0, ErrMsgStruct("RTA42F1", srcMsg, ""));
|
|
|
|
|
|
unsigned long userCode = std::stoi(srcMsg.substr(headerStr.length()));
|
|
|
std::string userCodeStr = CSimpleString::Format("0x%X", userCode).GetData();
|
|
|
@@ -825,8 +825,8 @@ std::pair<std::string, std::string> SM2_Encrypt_Manager::EncryptMsg(std::string
|
|
|
unsigned char sign[DEFAULT_KEY_LEN] = "";
|
|
|
int sign_len = DEFAULT_KEY_LEN;
|
|
|
|
|
|
- unsigned char* dstMsg = new unsigned char[msg.length() * 2];
|
|
|
- int dstMsgLen = msg.length() * 2;
|
|
|
+ unsigned char* dstMsg = new unsigned char[msg.length() * 2 + 97];
|
|
|
+ int dstMsgLen = msg.length() * 2 + 97;
|
|
|
std::shared_ptr<void> msgClean((void*)0, [&](void*) {
|
|
|
if (dstMsg)
|
|
|
{
|