aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-06-01 00:58:19 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-06-01 00:58:19 +0000
commit9ec60051feda995069d17a9590ccaf13dbef895c (patch)
tree108c7e7aed843c2fa99d0d4ae3f6efd08b88ed06 /code/qcommon
parent46841aa463009df7ecf31964a93e2a25aa0259ce (diff)
downloadioquake3-aero-9ec60051feda995069d17a9590ccaf13dbef895c.tar.gz
ioquake3-aero-9ec60051feda995069d17a9590ccaf13dbef895c.zip
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
Diffstat (limited to 'code/qcommon')
-rw-r--r--code/qcommon/md4.c4
1 files 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);