From ed4e14dc205bead9b4b9c2666397eb8f9c599dd9 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 22 Nov 2013 21:41:49 +0000 Subject: (svn r26047) -Fix: possible, but very unlikely, null pointer dereference when gunziping just downloaded files --- src/network/network_content.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp index e6e91897c..047269969 100644 --- a/src/network/network_content.cpp +++ b/src/network/network_content.cpp @@ -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"); -- cgit v1.2.3-54-g00ecf