nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] corruption when attaching all-null files

2014-05-07 13:04:01
ken wrote:
A file of all \0 wouldn't match any of these cases (contains8bit only
gets set if the function fails isascii(), which is between 0 and 127.).
I think we need a new test (isvalid7bit?  Have to think about it).

Also ... we use fgets() to read in the file we're scanning.  We'll fail
with NULs when it comes to that.  It looks like we should be using
getline() instead.  Is that pretty common nowadays?  Looks like it's

i'm completely unfamiliar with the code paths in question, but if
we're reading an arbitrary file, shouldn't we just use fread()?

paul

part of POSIX, but at least one older system I have access to doesn't
have it.  Sigh.

--Ken

----------------------
 paul fox, pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us (arlington, ma, 
where it's 65.8 degrees)

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>