On Mon, Apr 12, 2021 at 04:29:36PM -0600, Todd C. Miller wrote:
> On Mon, 12 Apr 2021 21:18:41 +0200, Stefan Sperling wrote:
> 
> > The problem is that the code scanning a common chunk of lines doesn't
> > account for the possibility that EOF may occur before a final newline.
> >
> > This patch fixes the problem in all affected tools in the tree. OK?
> 
> The return value of getc() should be checked against EOF, not -1.
> I know this is not a new problem in that code base so if you'd
> rather leave that change for a cleanup diff that is OK by me.

I noticed this too, and indeed I'd rather fix those -1s in a separate
patch which doesn't change behaviour. It seems these have already been
fixed in Got's copy of the code; it will be trivial for me to compare
notes and fix them in-tree as well.

Reply via email to