Ilja Booij wrote:

This forgets to add the final '\0' character in envelopefrom. A simpel strlen(envelopefrom) + 1 solves the problem.

Why the bug wasn't found earlier I don't know. This code hasn't changed in the last versions.


It could be because memcpy() and strcpy() and such will always copy some number of words. I believe Linux x86 uses multiples of 8 bytes and AIX PowerPC uses 16; or maybe it's the other way around. I've written code that ran on both where certain input strings would cause a core on Linux but not AIX. This often makes off-by-one errors rare to surface and difficult to reproduce.

--
Will Berry
Co-founder, Second Brain website hosting
http://www.secondbrainhosting.com/

Reply via email to