(svn r26047) -Fix: possible, but very unlikely, null pointer dereference when gunziping just downloaded files

This commit is contained in:
rubidium 2013-11-22 21:41:49 +00:00
parent fad4fa09ba
commit ed4e14dc20
1 changed files with 2 additions and 0 deletions

View File

@ -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");