Fixed a crash in md4 routines when using them on files with zero length, reported by Lukasz Saduniowski.

This commit is contained in:
Thilo Schulz 2006-06-01 00:58:19 +00:00
parent 9af85d9378
commit 84296bfc2c

View file

@ -159,10 +159,10 @@ static void mdfour_update(struct mdfour *md, byte *in, int n)
{ {
uint32_t M[16]; uint32_t M[16];
if (n == 0) mdfour_tail(in, n);
m = md; m = md;
if (n == 0) mdfour_tail(in, n);
while (n >= 64) { while (n >= 64) {
copy64(M, in); copy64(M, in);
mdfour64(M); mdfour64(M);