mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
Fixed a crash in md4 routines when using them on files with zero length, reported by Lukasz Saduniowski.
This commit is contained in:
parent
9af85d9378
commit
84296bfc2c
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue