1
0

Fixed buffer overflow in JSON.

Reported on Coverity as CID 43614.
This commit is contained in:
madmaxoft 2014-06-04 10:46:33 +02:00
parent 9ef4b9d52d
commit b79142c8e7

View File

@ -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 );