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:
1 parent
cd3774932e
commit
b30e84b156
1 file changed
+2
-2
+2
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user