> Malloc doesnt guarantee an alignment of any sort. Yes it does. It guarantees that what it returns can be used for worst-case alignment so that anything will work, as in int* foo = (int*)malloc(sizeof *foo); *foo = 42; free(foo);
In this particular case, malloc may return "three" extra bytes, knowing that they will be wasted by the cast. But then it has to allow for that in the implementation of free(), and that's very hard to do. So malloc returns a pointer that is already worst-case aligned. /r$ -- Rich Salz Chief Security Architect DataPower Technology http://www.datapower.com XS40 XML Security Gateway http://www.datapower.com/products/xs40.html ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]