summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-03 17:56:59 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-03 17:56:59 +0000
commite58c47e5e65de72d7772c3409668f98c89efe169 (patch)
tree8db644998f77998749586a9fe4fffd122f480469 /read.c
parentbfb5379773797c0f73dbde46184c57382257694e (diff)
downloadmandoc-e58c47e5e65de72d7772c3409668f98c89efe169.tar.gz
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 <Stapelberg at debian dot org>.
Diffstat (limited to 'read.c')
-rw-r--r--read.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/read.c b/read.c
index fd0f1957..5a887d60 100644
--- a/read.c
+++ b/read.c
@@ -837,6 +837,7 @@ mparse_reset(struct mparse *curp)
free(curp->sodest);
curp->sodest = NULL;
+ curp->gzip = 0;
}
void