mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r26047) -Fix: possible, but very unlikely, null pointer dereference when gunziping just downloaded files
This commit is contained in:
parent
fad4fa09ba
commit
ed4e14dc20
|
@ -404,6 +404,8 @@ static bool GunzipFile(const ContentInfo *ci)
|
|||
#if defined(WITH_ZLIB)
|
||||
bool ret = true;
|
||||
FILE *ftmp = fopen(GetFullFilename(ci, true), "rb");
|
||||
if (ftmp == NULL) return false;
|
||||
|
||||
gzFile fin = gzdopen(fileno(ftmp), "rb");
|
||||
FILE *fout = fopen(GetFullFilename(ci, false), "wb");
|
||||
|
||||
|
|
Loading…
Reference in New Issue