Index: zlib-1.2.5_git201105121450/gzlib.c =================================================================== --- zlib-1.2.5_git201105121450.orig/gzlib.c 2011-05-12 16:50:18.000000000 +0200 +++ zlib-1.2.5_git201105121450/gzlib.c 2011-05-27 10:45:36.467678080 +0200 @@ -91,6 +91,9 @@ { gz_statep state; + if (!path || !mode) + return NULL; + /* allocate gzFile structure to return */ state = malloc(sizeof(gz_state)); if (state == NULL)