Re: [PATCH] Use O_BINARY to detect whether to pass "rb" to popen

Bruce Korb <[email protected]> Fri, 22 May 2015 09:48:27 -0700
Newsgroups gmane.comp.gnu.utils.bugs
Organization FSF
Message-ID <[email protected]>
On 05/22/15 08:43, Filipe Brandenburger wrote:
> Yeah in that case they should probably be separate patches. I'll send
> you a sequence you can grab with "git am". I'm almost done testing
> them, so expect them shortly.

I guess I'm lazy.  They "should be", but....

> Would be nice to add a test case for it... Is the uu-encoded file that
> caused the crash available somewhere public? Or would it be easy to
> create a simple test case with the same kind of problem?

My philosophy on that is that such a test case (which I did use to verify
the patch) would never fire again.  It is sufficiently non-obvious that
the likelihood of such a test catching an inadvertent problem is zero.
In other words, if there is or will be another "begin" line that can
cause a fault, it would likely not be caught by such a test.  It would
likely need another failure pattern.  WRT that, though, some negative
testing would be a good thing -- were this a more actively used product.
Nearly everyone uses MIME-encoding for shipping around files nowadays.
This is a pretty anachronistic project.

Short form: be my guest.  I'd happily add them to the suite (of 3).