ezmlm_hash() returns different values depend on OS
| Bug #47969 | ezmlm_hash() returns different values depend on OS | ||||
|---|---|---|---|---|---|
| Submitted: | 2009-04-14 17:53 UTC | Modified: | 2009-04-15 14:25 UTC | ||
| From: | lochoda at endai dot com | Assigned: | |||
| Status: | Closed | Package: | Mail related | ||
| PHP Version: | 5.2.9 | OS: | freebsd 64bit, linux 64bit | ||
| Private report: | No | CVE-ID: | None | ||
[2009-04-14 17:53 UTC] 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
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2009-04-15 14:25 UTC] iliaa@php.net