|
|
@@ -276,8 +276,9 @@ static bool Json2Object(ByteData& aimObj, const Json::Value& jsonTypeValue)
|
|
|
return false;
|
|
|
}
|
|
|
else {
|
|
|
- StrBuf2HexBuf(jsonTypeValue.asString().c_str(), &tmp);
|
|
|
- memcpy(aimObj.bData, tmp, 4096);
|
|
|
+ memset(aimObj.bData, 0, 4096);
|
|
|
+ int len = StrBuf2HexBuf(jsonTypeValue.asString().c_str(), &tmp);
|
|
|
+ memcpy(aimObj.bData, tmp, len);
|
|
|
delete[] tmp;
|
|
|
return true;
|
|
|
}
|