You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2016/07/17 15:44:40 UTC
thrift git commit: THRIFT-3879 Undefined evaluation order causes
incorrect processing in the C++ library JSON protocol Client: C++ Patch:
Daniel Mueller
Repository: thrift
Updated Branches:
refs/heads/master f38407676 -> 4300b72b2
THRIFT-3879 Undefined evaluation order causes incorrect processing in the C++ library JSON protocol
Client: C++
Patch: Daniel Mueller <dt...@web.de>
This closes #1050
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/4300b72b
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/4300b72b
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/4300b72b
Branch: refs/heads/master
Commit: 4300b72b2dce36f1cccb71bcabe8f6c42e888ab3
Parents: f384076
Author: dtmuller <dt...@web.de>
Authored: Fri Jul 15 10:05:43 2016 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Sun Jul 17 17:44:20 2016 +0200
----------------------------------------------------------------------
lib/cpp/src/thrift/protocol/TJSONProtocol.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/4300b72b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
index 412e927..31ebb3c 100644
--- a/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
+++ b/lib/cpp/src/thrift/protocol/TJSONProtocol.cpp
@@ -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) {