[PATCH 1/5] util/zlib-extra.c: don't pass NULL to gzerror.
David Bremner
david at tethera.net
Sun Apr 12 19:10:12 PDT 2020
Although (as of 1.2.11) zlib checks this parameter before writing to
it, the docs don't promise to keep doing so, so be safe.
---
util/zlib-extra.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/zlib-extra.c b/util/zlib-extra.c
index f691cccf..e17a9731 100644
--- a/util/zlib-extra.c
+++ b/util/zlib-extra.c
@@ -79,8 +79,10 @@ gz_getline (void *talloc_ctx, char **bufptr, ssize_t *bytes_read, gzFile stream)
const char *
gz_error_string (util_status_t status, gzFile file)
{
+ int dummy;
+
if (status == UTIL_GZERROR)
- return gzerror (file, NULL);
+ return gzerror (file, &dummy);
else
return util_error_string (status);
}
--
2.25.1
More information about the notmuch
mailing list