Replace a 32 bit shift with two 16 bit shifts.
The behaviour of a 32 bit shift on a 32 bit integer is undefined. Replace it with two 16 bit shifts to make it work on a 32 bit Perl. Ref pandora_enterprise#1417.
This commit is contained in:
parent
ebe1f37bf9
commit
98424c20a3
|
@ -1363,7 +1363,7 @@ sub md5 {
|
|||
# Append bit /* bit, not byte */ length of unpadded message as 64-bit
|
||||
# little-endian integer to message.
|
||||
$msg .= unpack ("B32", pack ("V", $bit_len));
|
||||
$msg .= unpack ("B32", pack ("V", $bit_len >> 32));
|
||||
$msg .= unpack ("B32", pack ("V", ($bit_len >> 16) >> 16));
|
||||
|
||||
# Process the message in successive 512-bit chunks.
|
||||
for (my $i = 0; $i < length ($msg); $i += 512) {
|
||||
|
|
Loading…
Reference in New Issue