From:             lochoda at endai dot com
Operating system: freebsd 64bit, linux 64bit
PHP version:      5.2.9
PHP Bug Type:     Mail related
Bug description:  ezmlm_hash() returns different values depend on OS 

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 bug report at http://bugs.php.net/?id=47969&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=47969&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=47969&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=47969&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=47969&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=47969&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=47969&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=47969&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=47969&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=47969&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=47969&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=47969&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=47969&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=47969&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=47969&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47969&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47969&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=47969&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=47969&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=47969&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=47969&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=47969&r=mysqlcfg

Reply via email to