Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F12945054
D4018.id11222.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D4018.id11222.diff
View Options
diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp
--- a/src/crypto/ripemd160.cpp
+++ b/src/crypto/ripemd160.cpp
@@ -294,7 +294,7 @@
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;
diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp
--- a/src/crypto/sha1.cpp
+++ b/src/crypto/sha1.cpp
@@ -162,7 +162,7 @@
sha1::Transform(s, buf);
bufsize = 0;
}
- while (end >= data + 64) {
+ while (end - data >= 64) {
// Process full chunks directly from the source.
sha1::Transform(s, data);
bytes += 64;
diff --git a/src/crypto/sha512.cpp b/src/crypto/sha512.cpp
--- a/src/crypto/sha512.cpp
+++ b/src/crypto/sha512.cpp
@@ -256,7 +256,7 @@
sha512::Transform(s, buf);
bufsize = 0;
}
- while (end >= data + 128) {
+ while (end - data >= 128) {
// Process full chunks directly from the source.
sha512::Transform(s, data);
data += 128;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 6, 17:33 (21 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5082784
Default Alt Text
D4018.id11222.diff (1 KB)
Attached To
D4018: Do not construct out-of-bound pointers in SHA2 code
Event Timeline
Log In to Comment