From 277354807e04c042bb40af1b6361dc7a7e132809 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 2 Mar 2015 00:05:30 +1100 Subject: [PATCH] hash/md5: fix blocksize block flushing on update --- hash/md5.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/md5.cpp b/hash/md5.cpp index 0be92e55..0b8f671c 100644 --- a/hash/md5.cpp +++ b/hash/md5.cpp @@ -115,7 +115,7 @@ MD5::update (const uint8_t *data, size_t size) { size_t offset = m_total % sizeof (Xb); size_t remain = sizeof (Xb) - offset; - if (size > remain) { + if (size >= remain) { memcpy (Xb + offset, data, remain); transform ();