Second of two-part fix. Replaced use of strlen().
test/cleanup ## The "cleanup" test should always be last.
XFAIL_TESTS = \
test/cleanup ## The "cleanup" test should always be last.
XFAIL_TESTS = \
- test/mhshow/test-binary \
test/scan/test-header-parsing \
#
test/scan/test-header-parsing \
#
-[ part - text/plain - 20B ]
+[ part - text/plain - 23B ]
Here's a null byte: " ".
"
Here's a null byte: " ".
"
- ct->c_begin = ftell (in) - strlen (buf);
+ if (name[0] == ':') {
+ /* Special case: no blank line between header and body. The
+ file position indicator is on the newline at the end of the
+ line, but it needs to be one prior to the beginning of the
+ line. So subtract the length of the line, bufsz, plus 1. */
+ ct->c_begin = ftell (in) - (bufsz + 1);
+ } else {
+ ct->c_begin = ftell (in) - (bufsz - 1);
+ }