Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Digest::Tiger is broken on amd64

3 views
Skip to first unread message

Alan Curry

unread,
Aug 26, 2012, 2:02:21 AM8/26/12
to
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
used.

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
0 new messages