mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
Prevent use after free of lump name in WAD compression-handling code.
Located by my new compiler! Also a nice, simple test commit for my new Git client...
This commit is contained in:
parent
cd3774932e
commit
b30e84b156
1 changed files with 2 additions and 2 deletions
|
@ -611,8 +611,6 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
|||
lump_p->name2 = Z_Calloc(zentry->namelen + 1, PU_STATIC, NULL);
|
||||
strncpy(lump_p->name2, fullname, zentry->namelen);
|
||||
|
||||
free(fullname);
|
||||
|
||||
switch(zentry->compression)
|
||||
{
|
||||
case 0:
|
||||
|
@ -631,6 +629,8 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
|||
lump_p->compression = CM_UNSUPPORTED;
|
||||
break;
|
||||
}
|
||||
|
||||
free(fullname);
|
||||
}
|
||||
|
||||
*nlmp = numlumps;
|
||||
|
|
Loading…
Reference in a new issue