SHA256
1
0
forked from pool/zlib
zlib/zlib-1.2.5-gzopen-null-check.patch
Sascha Peilicke 7edff8842c Accepting request 71640 from Base:System
- 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
2011-05-30 07:04:50 +00:00

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)