From: Nikita Popov Date: Fri, 24 Feb 2017 22:22:24 +0000 (+0100) Subject: Merge branch 'PHP-7.0' into PHP-7.1 X-Git-Tag: php-7.1.3RC1~7^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f678b0eae2766a91e3a9e680b3d71befe7e4879c;p=php Merge branch 'PHP-7.0' into PHP-7.1 --- f678b0eae2766a91e3a9e680b3d71befe7e4879c diff --cc ext/hash/hash_gost.c index 7961fc6c3a,c17133786c..95c61a9399 --- a/ext/hash/hash_gost.c +++ b/ext/hash/hash_gost.c @@@ -227,14 -227,13 +227,13 @@@ static inline void Gost(PHP_GOST_CTX *c static inline void GostTransform(PHP_GOST_CTX *context, const unsigned char input[32]) { int i, j; - uint32_t data[8], temp = 0, save = 0; - php_hash_uint32 data[8], temp = 0; ++ uint32_t data[8], temp = 0; for (i = 0, j = 0; i < 8; ++i, j += 4) { - data[i] = ((php_hash_uint32) input[j]) | (((php_hash_uint32) input[j + 1]) << 8) | - (((php_hash_uint32) input[j + 2]) << 16) | (((php_hash_uint32) input[j + 3]) << 24); + data[i] = ((uint32_t) input[j]) | (((uint32_t) input[j + 1]) << 8) | + (((uint32_t) input[j + 2]) << 16) | (((uint32_t) input[j + 3]) << 24); - save = context->state[i + 8]; context->state[i + 8] += data[i] + temp; - temp = ((context->state[i + 8] < data[i]) || (context->state[i + 8] < save)) ? 1 : 0; + temp = context->state[i + 8] < data[i] ? 1 : (context->state[i + 8] == data[i] ? temp : 0); } Gost(context, data);