From ef95c927d9c940364e4a5423524f641ecc36264f Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 15 Nov 2023 17:28:16 +0100 Subject: [PATCH] Fix UB in hash-library Fix https://oss-fuzz.com/testcase-detail/5137689594429440 Apply https://github.com/stbrumme/hash-library/pull/15 --- 3rdParty/hash-library/md5.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdParty/hash-library/md5.cpp b/3rdParty/hash-library/md5.cpp index 9c54dd9bd5..2bcb186cfc 100644 --- a/3rdParty/hash-library/md5.cpp +++ b/3rdParty/hash-library/md5.cpp @@ -292,7 +292,7 @@ void MD5::processBuffer() if (paddedLength < BlockSize) addLength = m_buffer + paddedLength; else - addLength = extra + paddedLength - BlockSize; + addLength = extra + (paddedLength - BlockSize); // must be little endian *addLength++ = msgBits & 0xFF; msgBits >>= 8;