mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix a possible buffer overflow.
This commit is contained in:
@@ -719,7 +719,7 @@ Reader::decodeDouble ( Token& token )
|
|||||||
int count;
|
int count;
|
||||||
int length = int (token.end_ - token.start_);
|
int length = int (token.end_ - token.start_);
|
||||||
|
|
||||||
if ( length <= bufferSize )
|
if ( length < bufferSize )
|
||||||
{
|
{
|
||||||
Char buffer[bufferSize];
|
Char buffer[bufferSize];
|
||||||
memcpy ( buffer, token.start_, length );
|
memcpy ( buffer, token.start_, length );
|
||||||
|
|||||||
Reference in New Issue
Block a user