Skip to content

Commit

Permalink
Fix UB in hash-library (#1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashashura authored Nov 16, 2023
1 parent 34e4b62 commit 762c7fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 3rdParty/hash-library/md5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 762c7fd

Please sign in to comment.