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.
> 2. My BIG_ENDIAN macro usage was incompatible with linux/stdlib, this
> was caught by the self test.
> 3 The same self test as windows should work on all machines.
>
> Attaching the unified diffs from blowfish.[ch] vs patch4/blowfish.[ch]
>
> thanks for the details,
> mohsin

1/  "unsigned int" is not guaranteed to be 32 bits.
It is typically 32-bits, but it may also be 16 or 64 bits.

2/  To test whether it's big or small endian, I think that the
configure script is more adapted to that.  I don't think
that using '4321' is portable.  See what gcc manual
says about multichar:

http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

-Wno-multichar
    Do not warn if a multicharacter constant (`'FOOF'') is used.
    Usually they indicate a typo in the user's code, as they
    have implementation-defined values, and should not be
    used in portable code.

Regards
-- Dominique

-- 
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

Raspunde prin e-mail lui