aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/ripemd160.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2019-05-03 16:08:11 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2019-05-06 15:11:10 -0700
commitc01c065b9ded3399a6a480f15543827dd5e8eb4d (patch)
tree9950ce5e8692cd40ed625686466f5394a92430cc /src/crypto/ripemd160.cpp
parent94daebf327e38ebb0c578bffbabe76961e11d9ee (diff)
downloadbitcoin-c01c065b9ded3399a6a480f15543827dd5e8eb4d.tar.xz
Do not construct out-of-bound pointers in SHA512/SHA1/RIPEMD160 code
Diffstat (limited to 'src/crypto/ripemd160.cpp')
-rw-r--r--src/crypto/ripemd160.cpp2
1 files changed, 1 insertions, 1 deletions
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;