#47969 [Opn->Csd]: ezmlm_hash() returns different values depend on OS
| From: | iliaa@php.net | Date: | Wed, 15 Apr 2009 14:25:29 +0000 |
| Subject: | #47969 [Opn->Csd]: ezmlm_hash() returns different values depend on OS | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-135837@lists.php.net to get a copy of this message | ||
ID: 47969
Updated by: iliaa@php.net
Reported By: lochoda at endai dot com
-Status: Open
+Status: Closed
Bug Type: Mail related
Operating System: freebsd 64bit, linux 64bit
PHP Version: 5.2.9
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2009-04-14 17:53:42] lochoda at endai dot com
Description:
------------
ezmlm_hash() returns different values depend on OS (32bit vs. 64bit)
The problem is with types used in the algorithm.
Easy fix that works for unix and linux is to change
unsigned long h = 5381L;
to
unsigned int h = 5381;
because int is always 4byte type on linux and unix.
Reproduce code:
---------------
run ezmlm_hash() on linux 32bit and 64bit and compare results
Expected result:
----------------
the same results
Actual result:
--------------
different results
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47969&edit=1