Skip to content

Commit

Permalink
- Fixed bug #37192 (cc fails on hash_adler.c:32)
Browse files Browse the repository at this point in the history
  • Loading branch information
m6w6 committed Apr 25, 2006
1 parent 5b973c8 commit 1c02dff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Apr 2006, PHP 5.1.3RC4
- Fixed bug #37192 (cc fails on hash_adler.c:32). Mike

20 Apr 2006, PHP 5.1.3RC3
- Fixed reading stream filters never notified about EOF. (Mike)
- Fixed bug #37167 (PDO segfaults when throwing exception from the fetch
Expand Down
4 changes: 3 additions & 1 deletion ext/hash/hash_adler32.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context)

PHP_HASH_API void PHP_ADLER32Update(PHP_ADLER32_CTX *context, const unsigned char *input, size_t len)
{
php_hash_uint32 i, s[2] = { context->state & 0xffff, (context->state >> 16) & 0xffff };
php_hash_uint32 i, s[2];

s[0] = context->state & 0xffff;
s[1] = (context->state >> 16) & 0xffff;
for (i = 0; i < len; ++i) {
s[0] = (s[0] + input[i]) % 65521;
s[1] = (s[1] + s[0]) % 65521;
Expand Down

0 comments on commit 1c02dff

Please sign in to comment.