From 9ec60051feda995069d17a9590ccaf13dbef895c Mon Sep 17 00:00:00 2001 From: thilo Date: Thu, 1 Jun 2006 00:58:19 +0000 Subject: Fixed a crash in md4 routines when using them on files with zero length, reported by Lukasz Saduniowski. git-svn-id: svn://svn.icculus.org/quake3/trunk@795 edf5b092-35ff-0310-97b2-ce42778d08ea --- 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 2501b2b..838b062 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); -- cgit v1.2.3