diff --git a/gzlib.c b/gzlib.c index baa3e79d4..4d6692d60 100644 --- a/gzlib.c +++ b/gzlib.c @@ -94,7 +94,7 @@ local gzFile gz_open(const void *path, int fd, const char *mode) { #endif /* check input */ - if (path == NULL) + if (path == NULL || mode == NULL) return NULL; /* allocate gzFile structure to return */