[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Resolution of getline() portability issues
From: |
Paul Fox |
Subject: |
Re: [Nmh-workers] Resolution of getline() portability issues |
Date: |
Fri, 16 May 2014 16:19:46 -0400 |
ken wrote:
> Guys, remind me .... I know Paul committed the code to switch from fgets
> to getline(), but it doesn't seem like any of the code for a getline
> replacement was introduced. Is that correct?
>
> On that note ... what do people think of bringing that code from master
> to the 1.6 branch? Outputting NULs as 7bit seems like a bug to me, but
> I wonder how common that is; I'm on the fence about bringing over to 1.6.
the bugs are worse than that -- the input is read incorrectly, since the buffer
returned by fgets() has embedded nulls that terminate it prematurely.
but i'm with david -- i think it can soak until 1.7.
btw, i didn't claim my fgets() cleanup was complete. for example,
mhbuild still uses it when parsing the draft, for instance. that
involves cleaning up callers of fgetstr(), which seemed like a big and
error-prone job. (that's from memory.)
paul
=----------------------
paul fox, address@hidden (arlington, ma, where it's 60.8 degrees)