ezmlm and amd64

Simone Lazzaris <[email protected]>
Newsgroups gmane.mail.ezmlm
Organization Interactive
Message-ID <[email protected]>
I've hit the 32/64 bit bug mentioned last august: I've got a mixed 
environment, in which some server are 32 bit i386 and some are x86_64.

The hash generated in subhash.c is different, so some people are not 
recognised as subscribed, randomly (depending on which server is handling the 
request).

In my (humble) opinion, the correct behaviour is to fix the code, forcing to 
always use 32 bit hash, which is the "historically correct" value.


This is the patch:

--- ezmlm-0.53/subhash.c  2006-11-23 21:54:38.000000000 +0100
+++ ezmlm-0.53-new/subhash.c 2007-05-31 17:19:33.000000000 +0200
@@ -5,7 +5,7 @@

 unsigned int subhashb(const char *s,long len)
 {
-  unsigned long h;
+  long h;
   h = 5381;
   while (len-- > 0)
     h = (h + (h << 5)) ^ (unsigned int)*s++;

-- 
Simone Lazzaris
Interactive S.r.L.
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBGXuzAcuOzjJ7tgM4RAhi9AJ42wSVxEMKFqIJk1v3HbJlsm1X0hgCg2W03
lOZRJn11TTLqgaQLFdUWKt0=
=Q+M6
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.