tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: Michael Stapelberg <stapelberg@debian.org>
Cc: tech@mdocml.bsd.lv
Subject: Re: [PATCH] Implement -u (UNIX socket batch processing)
Date: Fri, 3 Feb 2017 19:07:02 +0100	[thread overview]
Message-ID: <20170203180702.GA40913@athene.usta.de> (raw)
In-Reply-To: <CANnVG6=Fe7OLx4uPD-EkTuCEfzNpxiqkxp9o9ze_AUpAEc7tBA@mail.gmail.com>

Hi Michael,

Michael Stapelberg wrote on Sat, Jan 28, 2017 at 02:02:28PM +0100:

> Attaching revision 2 which resets ->gzip in mparse_reset(). I
> previously did not link against libz, so this issue escaped me.

independent of your added code, this part of your patch is
correct.  You found a genuine bug here, so i committed that
part of your patch, see below.

Thanks,
  Ingo


Log Message:
-----------
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>.

Modified Files:
--------------
    mdocml:
        read.c

Revision Data
-------------
Index: read.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/read.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -Lread.c -Lread.c -u -p -r1.158 -r1.159
--- read.c
+++ read.c
@@ -837,6 +837,7 @@ mparse_reset(struct mparse *curp)
 
 	free(curp->sodest);
 	curp->sodest = NULL;
+	curp->gzip = 0;
 }
 
 void
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2017-02-03 18:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-21 12:29 Michael Stapelberg
2017-01-28 13:02 ` Michael Stapelberg
2017-02-03 18:07   ` Ingo Schwarze [this message]
2017-02-04 12:57   ` Ingo Schwarze
2017-02-05 15:23     ` Michael Stapelberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170203180702.GA40913@athene.usta.de \
    --to=schwarze@usta.de \
    --cc=stapelberg@debian.org \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).