mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Merge branch 'pk3_leak' into 'master'
Pk3 Leaks See merge request STJr/SRB2!500
This commit is contained in:
commit
1af969d579
1 changed files with 7 additions and 4 deletions
11
src/w_wad.c
11
src/w_wad.c
|
@ -565,14 +565,14 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_ERROR, "Failed to read central directory (%s)\n", strerror(ferror(handle)));
|
CONS_Alert(CONS_ERROR, "Failed to read central directory (%s)\n", strerror(ferror(handle)));
|
||||||
Z_Free(lumpinfo);
|
Z_Free(lumpinfo);
|
||||||
free(zentry);
|
free(zentries);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (memcmp(zentry->signature, pat_central, 4))
|
if (memcmp(zentry->signature, pat_central, 4))
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_ERROR, "Central directory is corrupt\n");
|
CONS_Alert(CONS_ERROR, "Central directory is corrupt\n");
|
||||||
Z_Free(lumpinfo);
|
Z_Free(lumpinfo);
|
||||||
free(zentry);
|
free(zentries);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -585,7 +585,7 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_ERROR, "Unable to read lumpname (%s)\n", strerror(ferror(handle)));
|
CONS_Alert(CONS_ERROR, "Unable to read lumpname (%s)\n", strerror(ferror(handle)));
|
||||||
Z_Free(lumpinfo);
|
Z_Free(lumpinfo);
|
||||||
free(zentry);
|
free(zentries);
|
||||||
free(fullname);
|
free(fullname);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -627,6 +627,8 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(zentries);
|
||||||
|
|
||||||
*nlmp = numlumps;
|
*nlmp = numlumps;
|
||||||
return lumpinfo;
|
return lumpinfo;
|
||||||
}
|
}
|
||||||
|
@ -1326,8 +1328,9 @@ size_t W_ReadLumpHeaderPwad(UINT16 wad, UINT16 lump, void *dest, size_t size, si
|
||||||
{
|
{
|
||||||
size = 0;
|
size = 0;
|
||||||
zerr(zErr);
|
zerr(zErr);
|
||||||
(void)inflateEnd(&strm);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(void)inflateEnd(&strm);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue