mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-14 23:07:55 +02:00
Fixed bug #3139678: stack buffer overflow when parsing a double with a length of 32 characters.
This commit is contained in:
@@ -610,7 +610,7 @@ Reader::decodeDouble( Token &token )
|
||||
int length = int(token.end_ - token.start_);
|
||||
if ( length <= bufferSize )
|
||||
{
|
||||
Char buffer[bufferSize];
|
||||
Char buffer[bufferSize+1];
|
||||
memcpy( buffer, token.start_, length );
|
||||
buffer[length] = 0;
|
||||
count = sscanf( buffer, "%lf", &value );
|
||||
|
Reference in New Issue
Block a user