mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Fix a potential free() of stack memory in screenshot code. Ouch!
git-svn-id: https://svn.eduke32.com/eduke32@2363 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
165d291a48
commit
2d6f24a3f2
1 changed files with 3 additions and 3 deletions
|
@ -15609,10 +15609,7 @@ static int32_t screencapture_common1(char *fn, const char *ext, BFILE** filptr)
|
||||||
|
|
||||||
*filptr = Bfopen(fn,"wb");
|
*filptr = Bfopen(fn,"wb");
|
||||||
if (*filptr == NULL)
|
if (*filptr == NULL)
|
||||||
{
|
|
||||||
Bfree(fn);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -15774,7 +15771,10 @@ static int32_t screencapture_tga(const char *filename, char inverseit)
|
||||||
|
|
||||||
i = screencapture_common1(fn, "tga", &fil);
|
i = screencapture_common1(fn, "tga", &fil);
|
||||||
if (i)
|
if (i)
|
||||||
|
{
|
||||||
|
Bfree(fn);
|
||||||
return i;
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
# ifdef USE_OPENGL
|
# ifdef USE_OPENGL
|
||||||
if (rendmode >= 3 && qsetmode == 200)
|
if (rendmode >= 3 && qsetmode == 200)
|
||||||
|
|
Loading…
Reference in a new issue