From 402f80d3490ec5c23b61eb24899c3b54901f4532 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 3 Feb 2017 17:56:59 +0000 Subject: If an application parses multiple files with mparse_readfd(3) but without using mparse_open(3) to open the files, and if one of the files includes a gzip'ed file with .so, then the gzip flag remains set and the next main file will be expected to be gzip'ed. Fix this by clearing the gzip flag in mparse_reset(3). Bug found and patch provided by Michael . --- read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'read.c') diff --git a/read.c b/read.c index 885a2746..5c8af397 100644 --- a/read.c +++ b/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.158 2017/01/28 23:30:08 schwarze Exp $ */ +/* $Id: read.c,v 1.159 2017/02/03 17:56:59 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2017 Ingo Schwarze @@ -837,6 +837,7 @@ mparse_reset(struct mparse *curp) free(curp->sodest); curp->sodest = NULL; + curp->gzip = 0; } void -- cgit v1.2.3