Earlier in content_error(), it checks invo_name isn't NULL before using
it. Later, it passes it to strlen(3) without the check. Either the
former is redundant or the latter wrong. Rather than work out which,
delete the strlen(invo_name) because it was only used for a
variable-width indent on a second diagnostic line. Instead, indent by a
fixed four spaces, which will look better when invo_name is stupidly
long anyway. Bug present since pre-git.
1 multipart/related 180
2 text/plain 36
mhlist: content integrity suspect (digest mismatch) -- continuing
1 multipart/related 180
2 text/plain 36
mhlist: content integrity suspect (digest mismatch) -- continuing
- (content text/plain in message 11, part 2)'
+ (content text/plain in message 11, part 2)'
start_test '-nocheck, the default'
run_test 'mhlist last -part 2 -noheader -check -nocheck' \
start_test '-nocheck, the default'
run_test 'mhlist last -part 2 -noheader -check -nocheck' \
run_test 'mhstore last -part 2 -check' \
'storing message 11 part 2 as file 11.2.txt
mhstore: content integrity suspect (digest mismatch) -- continuing
run_test 'mhstore last -part 2 -check' \
'storing message 11 part 2 as file 11.2.txt
mhstore: content integrity suspect (digest mismatch) -- continuing
- (content text/plain in message 11, part 2)'
+ (content text/plain in message 11, part 2)'
check "$expected" 11.2.txt 'keep first'
# check -nocheck, the default
check "$expected" 11.2.txt 'keep first'
# check -nocheck, the default
content_error (char *what, CT ct, char *fmt, ...)
{
va_list arglist;
content_error (char *what, CT ct, char *fmt, ...)
{
va_list arglist;
char *bp, buffer[BUFSIZ];
CI ci;
char *bp, buffer[BUFSIZ];
CI ci;
- i = strlen (invo_name) + 2;
-
/* Now add content type and subtype */
/* Now add content type and subtype */
- snprintf (bp, buflen, "\n%*s(content %s/%s", i, "",
+ snprintf (bp, buflen, "\n (content %s/%s",
ci->ci_type, ci->ci_subtype);
len = strlen (bp);
bp += len;
ci->ci_type, ci->ci_subtype);
len = strlen (bp);
bp += len;