From c01c065b9ded3399a6a480f15543827dd5e8eb4d Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 3 May 2019 16:08:11 -0700 Subject: Do not construct out-of-bound pointers in SHA512/SHA1/RIPEMD160 code --- src/crypto/ripemd160.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/crypto/ripemd160.cpp') diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp index a00331dcb7..edee06cc34 100644 --- a/src/crypto/ripemd160.cpp +++ b/src/crypto/ripemd160.cpp @@ -256,7 +256,7 @@ CRIPEMD160& CRIPEMD160::Write(const unsigned char* data, size_t len) ripemd160::Transform(s, buf); bufsize = 0; } - while (end >= data + 64) { + while (end - data >= 64) { // Process full chunks directly from the source. ripemd160::Transform(s, data); bytes += 64; -- cgit v1.2.3