mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-3879 Undefined evaluation order causes incorrect processing in the C++ library JSON protocol
Client: C++ Patch: Daniel Mueller <dtmuller@web.de> This closes #1050
This commit is contained in:
parent
f384076760
commit
4300b72b2d
@ -651,7 +651,9 @@ uint32_t TJSONProtocol::writeMapBegin(const TType keyType,
|
||||
}
|
||||
|
||||
uint32_t TJSONProtocol::writeMapEnd() {
|
||||
return writeJSONObjectEnd() + writeJSONArrayEnd();
|
||||
uint32_t result = writeJSONObjectEnd();
|
||||
result += writeJSONArrayEnd();
|
||||
return result;
|
||||
}
|
||||
|
||||
uint32_t TJSONProtocol::writeListBegin(const TType elemType, const uint32_t size) {
|
||||
@ -1015,7 +1017,9 @@ uint32_t TJSONProtocol::readMapBegin(TType& keyType, TType& valType, uint32_t& s
|
||||
}
|
||||
|
||||
uint32_t TJSONProtocol::readMapEnd() {
|
||||
return readJSONObjectEnd() + readJSONArrayEnd();
|
||||
uint32_t result = readJSONObjectEnd();
|
||||
result += readJSONArrayEnd();
|
||||
return result;
|
||||
}
|
||||
|
||||
uint32_t TJSONProtocol::readListBegin(TType& elemType, uint32_t& size) {
|
||||
|
Loading…
Reference in New Issue
Block a user