From b79142c8e758bbb0f1ada23407a6ca184cac1163 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 4 Jun 2014 10:46:33 +0200 Subject: [PATCH] Fixed buffer overflow in JSON. Reported on Coverity as CID 43614. --- lib/jsoncpp/src/lib_json/json_reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jsoncpp/src/lib_json/json_reader.cpp b/lib/jsoncpp/src/lib_json/json_reader.cpp index e9d6b88d2..fb8421de9 100644 --- a/lib/jsoncpp/src/lib_json/json_reader.cpp +++ b/lib/jsoncpp/src/lib_json/json_reader.cpp @@ -623,7 +623,7 @@ Reader::decodeDouble( Token &token ) const int bufferSize = 32; int count; int length = int(token.end_ - token.start_); - if ( length <= bufferSize ) + if ( length < bufferSize ) { Char buffer[bufferSize]; memcpy( buffer, token.start_, length );