mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix 32-bit ext/hash build
This commit is contained in:
parent
23ea89404b
commit
2ee4d358dc
1 changed files with 4 additions and 2 deletions
|
@ -525,7 +525,8 @@ PHP_HASH_API void PHP_SHA384Update(PHP_SHA384_CTX * context, const unsigned char
|
||||||
if ((context->count[0] += ((uint64_t) inputLen << 3)) < ((uint64_t) inputLen << 3)) {
|
if ((context->count[0] += ((uint64_t) inputLen << 3)) < ((uint64_t) inputLen << 3)) {
|
||||||
context->count[1]++;
|
context->count[1]++;
|
||||||
}
|
}
|
||||||
context->count[1] += (uint64_t) (inputLen >> 61);
|
/* The cast may seem unnecessary, but on 32-bit this makes sure the result is 0 without invoking undefined behaviour. */
|
||||||
|
context->count[1] += (uint64_t) inputLen >> 61;
|
||||||
|
|
||||||
partLen = 128 - index;
|
partLen = 128 - index;
|
||||||
|
|
||||||
|
@ -679,7 +680,8 @@ PHP_HASH_API void PHP_SHA512Update(PHP_SHA512_CTX * context, const unsigned char
|
||||||
if ((context->count[0] += ((uint64_t) inputLen << 3)) < ((uint64_t) inputLen << 3)) {
|
if ((context->count[0] += ((uint64_t) inputLen << 3)) < ((uint64_t) inputLen << 3)) {
|
||||||
context->count[1]++;
|
context->count[1]++;
|
||||||
}
|
}
|
||||||
context->count[1] += (uint64_t) (inputLen >> 61);
|
/* The cast may seem unnecessary, but on 32-bit this makes sure the result is 0 without invoking undefined behaviour. */
|
||||||
|
context->count[1] += (uint64_t) inputLen >> 61;
|
||||||
|
|
||||||
partLen = 128 - index;
|
partLen = 128 - index;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue