The fdelimlen bytes starting at fdelim included a NUL at the end, e.g. 7
for "\nFrom \0". Other code seems not to expect this and has
conditional bits to work around it, perhaps without understanding why.
All the tests still pass, including with valgrind.
*s->fdelim = '\n';
s->msg_delim = s->fdelim+1;
s->edelim = s->msg_delim+1;
- s->fdelimlen = c + 1;
+ s->fdelimlen = c;
s->edelimlen = c - 1; /* == strlen (delimstr) */
strcpy (s->msg_delim, delimstr);
s->delimend = s->msg_delim + s->edelimlen;