7edff8842c
- fix bnc#679345: zlib segfaults when passing NULL to gzopen * return NULL checks back to gz_open OBS-URL: https://build.opensuse.org/request/show/71640 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zlib?expand=0&rev=31
15 lines
469 B
Diff
15 lines
469 B
Diff
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)
|