Don Zickus [off-list ref] writes:
Boundary lines in emails are treated as a special case. As a result of
processing the boundary line a new line will be read into the buffer.
The string length variable 'len' is evaluated before the boundary case, thus
there is the possibility the length of the string does not match the new
line read in (in the boundary line case). This causes a partial output of
the line to the patch file.
The fix is trivial, evaluate the length of the string right before
processing it.
Ah, I was about to bisect this to see where it needs to be fixed and if it
needs to be fixed in maint (or maint-1.5.5 and earlier). Thanks for doing
this before I got around to it.