James Vega wrote: > On Sun, May 16, 2010 at 08:14:08PM -0700, Mosh wrote: > > Dominique, > > > > I am able to reproduce the crash on 64bit linux (gcc > > x86_64-linux-gnu), the fix is: > > > > 1 blowfish blocks should always be 32bits: i.e. unsigned int, not > > unsigned long. > > Autoconf has the AC_TYPE_UINT32_T[0] macro which can be used to ensure > there's a uint32_t defined. > > > 2. My BIG_ENDIAN macro usage was incompatible with linux/stdlib, this > > was caught by the self test. > > There's also the AC_C_BIGENDIAN[1] macro that may be useful for > detecting little-endian vs. big-endian. > > [0]: > http://www.gnu.org/software/autoconf/manual/html_node/Particular-Types.html#index-AC_005fTYPE_005fUINT32_005fT-791 > [1]: > http://www.gnu.org/software/autoconf/manual/html_node/C-Compiler.html#index-AC_005fC_005fBIGENDIAN-873
Using configure to figure out the types sounds like the right solution for Unix. I prefer to stay as close to the original implementation as possible. Any small mistake can significantly lower the quality of the encryption. We also need to have #ifdefs of compilation arguments in the Makefile for other systems than Unix. Perhaps we can simply assume that uint32_t exists and wait for someone to complain when it doesn't work. And add a check in the blowfish test function. -- hundred-and-one symptoms of being an internet addict: 54. You start tilting your head sideways to smile. :-) /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
