The initial type change does the trick for the formula itself. And yes, the code relies on an integer being 64bit

Ilia Alshanetsky

On 15-Apr-09, at 2:05 PM, Matt Wilmas wrote:

Hi Ilia,

----- Original Message -----
From: "Ilia Alshanetsky"
Sent: Wednesday, April 15, 2009

iliaa Wed Apr 15 14:24:38 2009 UTC

Modified files:              (Branch: PHP_5_3)
  /php-src/ext/standard mail.c

Fixed bug #47969 (ezmlm_hash() returns different values depend on OS)
@@ -76,7 +76,7 @@
char *str = NULL;
- unsigned long h = 5381L;
+ unsigned int h = 5381;

You're relying on int being 32-bit?  Couldn't it be 64-bit as well?

BTW, (unsigned long) cast is still used in the loop, although I guess it's not affecting that expression... And the cast in RETURN_LONG((int) h); isn't needed, but that was true before. Just noticed while checking if I was missing something else. :-)

- Matt

PHP CVS Mailing List (
To unsubscribe, visit:

Reply via email to