From 84296bfc2c435c5cd844275005c239647aed9868 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Thu, 1 Jun 2006 00:58:19 +0000 Subject: [PATCH] Fixed a crash in md4 routines when using them on files with zero length, reported by Lukasz Saduniowski. --- code/qcommon/md4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/qcommon/md4.c b/code/qcommon/md4.c index 2501b2b6..838b062e 100644 --- a/code/qcommon/md4.c +++ b/code/qcommon/md4.c @@ -159,10 +159,10 @@ static void mdfour_update(struct mdfour *md, byte *in, int n) { uint32_t M[16]; - if (n == 0) mdfour_tail(in, n); - m = md; + if (n == 0) mdfour_tail(in, n); + while (n >= 64) { copy64(M, in); mdfour64(M);