com php-src: Merge branch 'PHP-7.0' into PHP-7.1: NEWS ext/hash/hash_gost.c

[email protected] (Nikita Popov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    f678b0eae2766a91e3a9e680b3d71befe7e4879c
Author:    Nikita Popov <[email protected]>         Fri, 24 Feb 2017 23:22:24 +0100
Parents:   0ceedea2ccd39215b805c76a27ea857a1dc71222 eac8166bd468a3c7c00b5163f6f86804911b660d
Branches:  PHP-7.1 master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=f678b0eae2766a91e3a9e680b3d71befe7e4879c

Log:
Merge branch 'PHP-7.0' into PHP-7.1

Changed paths:
  MM  NEWS
  MM  ext/hash/hash_gost.c


Diff:
diff --cc ext/hash/hash_gost.c
index 7961fc6,c171337..95c61a9
--- 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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.