[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

sha1 alignment bug



In sha1.h, there are a few member variables defined as:

unsigned char Buffer[64];
unsigned char State[5*4];
unsigned char Count[2*4];

the code goes on to address these as uint32_t * 's... on 64-bit
architectures this causes very bad unaligned accesses.

i've fixed this in cvs by adding appropriate attribute settings to these
buffers. i wonder if there are other ones like these in the code?

randolph
-- 
Debian Developer <tausq@debian.org>
http://www.TauSq.org/



Reply to: