Digest::Tiger is broken on amd64

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Tiger.xs:endian_swap corrupts memory with a buffer overflow on amd64
machines, because of:

typedef unsigned long word32;

Ouch! That's a 64-bit type on 64-bit processors in the civilized world.
Surely there's some predefined type (uint32_t?) in perl that should be

The result is that almost any call to hash() will segfault. "make test"
doesn't notice this problem because t/tiger.t contains 5 tests for
hexhash() and 0 tests for hash(). Ouch again.

Alan Curry

Site Timeline