From: Mark Adler Date: Fri, 14 Oct 2016 20:16:07 +0000 (-0700) Subject: Avoid recursive gzgetc() macro call. X-Git-Tag: 1.9.9-b1~737 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cfb532622acfb17cd9952110317b702d9554964;p=thirdparty%2Fzlib-ng.git Avoid recursive gzgetc() macro call. Recursive macro calls are normally caught by the preprocessor and avoided. This commit avoids the possibility of a problem entirely. --- diff --git a/zlib.h b/zlib.h index 91bd18e9f..f2c82a403 100644 --- a/zlib.h +++ b/zlib.h @@ -1647,7 +1647,7 @@ struct gzFile_s { z_off64_t pos; }; ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */ -# define gzgetc(g) ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) +# define gzgetc(g) ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) /* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if