mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 20:49:11 +00:00
(svn r26047) -Fix: possible, but very unlikely, null pointer dereference when gunziping just downloaded files
This commit is contained in:
@@ -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");
|
||||
|
||||
|
Reference in New Issue
Block a user