]> diplodocus.org Git - nmh/log
nmh
6 years agoMoved run_without_input() from test-version-check to common.sh.in.
David Levine [Sun, 25 Aug 2019 12:56:04 +0000 (08:56 -0400)]
Moved run_without_input() from test-version-check to common.sh.in.

6 years agoRemoved unnecessary warning about missing semicolon.
David Levine [Sun, 25 Aug 2019 12:49:53 +0000 (08:49 -0400)]
Removed unnecessary warning about missing semicolon.

The warning was for Content-Type and Content-Disposition, and was
incorrect.  Thanks to Tom for providing output with it.  Also
removed multiple trailing newlines from warning output, thanks to
Ralph for tracking those down.

6 years agoAdded test of encoded Resent-To: and Resent-cc:.
David Levine [Sat, 10 Aug 2019 22:50:39 +0000 (18:50 -0400)]
Added test of encoded Resent-To: and Resent-cc:.

6 years agoNo longer need trailing space after CFLAGS variable assignment.
David Levine [Sun, 4 Aug 2019 22:25:50 +0000 (18:25 -0400)]
No longer need trailing space after CFLAGS variable assignment.

6 years agoReorder configure options to be before variables
Ken Hornstein [Sun, 28 Jul 2019 01:22:12 +0000 (21:22 -0400)]
Reorder configure options to be before variables

Reorder the configure options generated by build_nmh so they
will be before the variables, otherwise they end up IN things like
CFLAGS.  Fixes bug #56680.

6 years agoFix handling of fullname
Ken Hornstein [Mon, 15 Jul 2019 18:25:53 +0000 (14:25 -0400)]
Fix handling of fullname

Make it that if a Local-Mailbox profile entry was NOT specified
that the fullname would be generated BEFORE the local mailbox was
generated, so the user's name ended up in the email address properly.

6 years agoshow and mhl now decode more addresses in header fields.
David Levine [Sun, 14 Jul 2019 13:29:21 +0000 (09:29 -0400)]
show and mhl now decode more addresses in header fields.

Added decoding of To:, Cc:, Resent-To:, Resent-Cc:, and
Resent-From: addresses to mhl.format and mhl.headers.  Thanks to
Conrad Hughes for suggesting it for the first two components and
to Ralph for suggesting it for the Resent- components.

6 years agoHandle teen ordinal suffixes correctly.
Ken Hornstein [Mon, 8 Jul 2019 15:37:15 +0000 (11:37 -0400)]
Handle teen ordinal suffixes correctly.

6 years agoCreate new mh-format function %(ordinal)
Ken Hornstein [Mon, 8 Jul 2019 13:59:15 +0000 (09:59 -0400)]
Create new mh-format function %(ordinal)

Implement a new mh-format function %(ordinal).  This will output
the appropriate ordinal prefix (st, nd, rd, st) based on the value
of the "num" register.

6 years agoSupport the TLS SNI extension
Ken Hornstein [Sat, 29 Jun 2019 18:17:16 +0000 (14:17 -0400)]
Support the TLS SNI extension

Add support for sending the TLS Server Name Indicator extension
during TLS connection negotiation.

6 years agoPrint port number in the connection error message
Ken Hornstein [Mon, 24 Jun 2019 16:42:05 +0000 (12:42 -0400)]
Print port number in the connection error message

If a connection to a host fails, print the port number in the brief error
message.  This will hopefully eliminate problems when nmh is using a default
port number that users are not expecting.

6 years ago- Fixed bcc to work with sendmail/pipe [Bug 55700].
Alexander Zangerl [Sun, 9 Jun 2019 15:40:38 +0000 (11:40 -0400)]
- Fixed bcc to work with sendmail/pipe [Bug 55700].

And better documented that dcc doesn't work with sendmail/pipe.

6 years agoCommit ddf3a8574f65 is a fix to commit af586ebe59b7.
David Levine [Sun, 9 Jun 2019 15:02:45 +0000 (11:02 -0400)]
Commit ddf3a8574f65 is a fix to commit af586ebe59b7.

6 years agoFixed inc(1) and %(me) to not obey Local-Mailbox profile component.
David Levine [Sun, 9 Jun 2019 14:58:11 +0000 (10:58 -0400)]
Fixed inc(1) and %(me) to not obey Local-Mailbox profile component.

Thanks to Martin McCormick for reporting and Ken for diagnosing.

6 years agoAdded missing ')'.
David Levine [Sun, 9 Jun 2019 14:57:07 +0000 (10:57 -0400)]
Added missing ')'.

6 years agoClean up more whitespace errors
Ken Hornstein [Sat, 18 May 2019 14:17:15 +0000 (10:17 -0400)]
Clean up more whitespace errors

Get rid of more whitespace errors; hopefully I got them all.

6 years agoRemove the #ifdef UK for the default scan format
Ken Hornstein [Sat, 18 May 2019 13:21:21 +0000 (09:21 -0400)]
Remove the #ifdef UK for the default scan format

Remove the #ifdef UK that lets you select an alternate default
scan format; this is left over from old mhconfig program.

6 years agoFix whitespace errors
Ken Hornstein [Sat, 18 May 2019 03:50:16 +0000 (23:50 -0400)]
Fix whitespace errors

6 years agoRemove final traces of TMA support
Ken Hornstein [Fri, 17 May 2019 18:27:28 +0000 (14:27 -0400)]
Remove final traces of TMA support

TMA (the TTI Trusted Mail Agent) was an early implementation of
encrypted mail and is long gone.  There were a few vestigial bits
of this support left in nmh, and this is finally removing them.
This includes the check for the "Encrypted" header field in various
scan formats and some code to return the code SCNENC from scan()
function where it would have special handling by programs like inc(1).

6 years agoAdded links to David Malone's MH 6.x archives.
David Levine [Wed, 15 May 2019 23:38:43 +0000 (19:38 -0400)]
Added links to David Malone's MH 6.x archives.

6 years agoCleanup MIME header handling in mhbuild
Ken Hornstein [Mon, 13 May 2019 00:07:56 +0000 (20:07 -0400)]
Cleanup MIME header handling in mhbuild

Per discussion on nmh-workers, cleanup the handling of MIME headers
in mhbuild.  The following logic should now apply.

If mhbuild is run with -auto AND a MIME-Version header is detected, then
exit silently with no error (and leave the draft untouched).  Otherwise,
if a MIME-Version header or ANY Content-* header is found, exit with an
error.  Note that this means if mhbuild is run with -auto then an error
will be returned if any Content-* headers are seen.

Previously, mhbuild would silently eat any Content-Type headers seen
in an existing draft; this behavior was brought forward from MH 6 and
no one could explain the reason for this behavior.  This behavior has
been removed.

6 years agoAdded several historical source archives from the early days of MH.
David Levine [Sun, 12 May 2019 15:03:14 +0000 (11:03 -0400)]
Added several historical source archives from the early days of MH.

SRI-NOSC, 2.9BSD, mh-jun-1982, and mh-nov-1983 predate those under
RCS/CVS source code control.

Thanks to M. Levinson, David Malone, Chad, Noel Chiappa, and Ralph
for advising of their discoveries of the various archive locations.

Removed docs/historical/mh-6.8.5/miscellany/mem/a.out because SPARC
executables shouldn't be archived.

6 years agoImprove fmttest output
Ken Hornstein [Sun, 5 May 2019 02:46:45 +0000 (22:46 -0400)]
Improve fmttest output

Improve the fmttest output; make it so more arguments to format
instructions are printed and clean up some of the argument handling.

6 years agoClarify %(profile) escape
Ken Hornstein [Sat, 4 May 2019 23:36:38 +0000 (19:36 -0400)]
Clarify %(profile) escape

Note that %(profile) can also pull entries from the context as well
as the profile

6 years agoRemove support for message/partial
Ken Hornstein [Sat, 4 May 2019 03:50:34 +0000 (23:50 -0400)]
Remove support for message/partial

6 years agoImprove SASL snoop output
Ken Hornstein [Thu, 2 May 2019 17:26:56 +0000 (13:26 -0400)]
Improve SASL snoop output

Generate more information in the netsec layer when -snoop is enabled.
Specifically, enumerate the supported SASL mechanisms by the client and
server and explain which layer is using encryption.

6 years agoPermit the matching of canonical MIME multipart boundaries
Ken Hornstein [Mon, 29 Apr 2019 01:07:24 +0000 (21:07 -0400)]
Permit the matching of canonical MIME multipart boundaries

Allow the matching of MIME multipart boundaries if the message is
in canonical form (\r\n line endings).

6 years agoUpdated name of generated file in comment of generation script.
David Levine [Thu, 25 Apr 2019 00:42:28 +0000 (20:42 -0400)]
Updated name of generated file in comment of generation script.

6 years agoRemoved test that hasn't been added to repo.
David Levine [Wed, 24 Apr 2019 23:22:22 +0000 (19:22 -0400)]
Removed test that hasn't been added to repo.

Fix to commit 3f845b1b0.

6 years agoCommented out full output device test in test-scan.
David Levine [Wed, 24 Apr 2019 23:10:02 +0000 (19:10 -0400)]
Commented out full output device test in test-scan.

Reverts commit d9b33232b.  It would pass on platforms that don't
have /dev/full, but was expected to fail.

6 years agoRemoved redundant initialization of local variable tls.
David Levine [Wed, 24 Apr 2019 22:46:51 +0000 (18:46 -0400)]
Removed redundant initialization of local variable tls.

Fix to commit ec173fd2c.  gcc noticed that it, in effect, it
was declared as an int but initialized the second time with
a bool value.

6 years agoRemove MIME content caching code
Ken Hornstein [Wed, 24 Apr 2019 17:05:30 +0000 (13:05 -0400)]
Remove MIME content caching code

Remove all of the MIME content caching code.  Besides being of dubious
value and having a number of 'interesting' security implications,
it apparently only would cache content if you ran it using mhn
(the necessary entry point was not copied over when mhn was split
apart) and it would only work on the top-level MIME content of a
message.

6 years agoRemoval of Content-MD5 support
Ken Hornstein [Wed, 24 Apr 2019 14:25:18 +0000 (10:25 -0400)]
Removal of Content-MD5 support

The generation and verification of Content-MD5 headers is no longer
done.  FINALLY.

6 years agoFix file descriptor leak in ruserpass()
Ken Hornstein [Tue, 23 Apr 2019 16:40:44 +0000 (12:40 -0400)]
Fix file descriptor leak in ruserpass()

6 years agoMention inc(1)/msgchk(1) changes
Ken Hornstein [Tue, 23 Apr 2019 16:30:36 +0000 (12:30 -0400)]
Mention inc(1)/msgchk(1) changes

6 years agoSet the close-on-exec flag for sockets
Ken Hornstein [Tue, 23 Apr 2019 01:42:14 +0000 (21:42 -0400)]
Set the close-on-exec flag for sockets

Since we no longer use closefds(), start cleaning up stray descriptors.
Start by making sure that any network sockets we create have the
close-on-exec flag set on them.

6 years agoMerge branch 'pop-stls'
Ken Hornstein [Tue, 23 Apr 2019 00:43:47 +0000 (20:43 -0400)]
Merge branch 'pop-stls'

6 years agoLoosen up valgrind suppression
Ken Hornstein [Tue, 23 Apr 2019 00:42:57 +0000 (20:42 -0400)]
Loosen up valgrind suppression

Change the valgrind suppression rules so they exclude more things
on MacOS X.

6 years agoGarbage collect closefds()
Ken Hornstein [Tue, 23 Apr 2019 00:36:14 +0000 (20:36 -0400)]
Garbage collect closefds()

Remove the closefds() function; it was used sporadically and was
causing problems on High Sierra.  In the future look at opening
more descriptors with FD_CLOEXEC.

6 years agoFinal cleanup of POP STLS support
Ken Hornstein [Tue, 23 Apr 2019 00:30:24 +0000 (20:30 -0400)]
Final cleanup of POP STLS support

Perform final cleanup for support for the STLS command in POP.  Add
necessary switches to msgchk and add information to man pages.

6 years agoOutput the header name for the PUTADDR instruction
Ken Hornstein [Mon, 22 Apr 2019 23:51:52 +0000 (19:51 -0400)]
Output the header name for the PUTADDR instruction

6 years agoAdd basic support for the STLS command in POP
Ken Hornstein [Mon, 22 Apr 2019 23:46:17 +0000 (19:46 -0400)]
Add basic support for the STLS command in POP

Add support for the STLS command in POP (sometimes called STARTTLS).
Functionality not yet complete.

7 years agoAdded -checkbase switch to mhfixmsg(1).
David Levine [Sun, 7 Apr 2019 17:17:23 +0000 (13:17 -0400)]
Added -checkbase switch to mhfixmsg(1).

7 years agoRenamed build_multipart_alt() to build_multipart().
David Levine [Sun, 7 Apr 2019 17:14:59 +0000 (13:14 -0400)]
Renamed build_multipart_alt() to build_multipart().

And some other minor code cleanup.

7 years agoAdd support for %(trimr) format function
Ken Hornstein [Fri, 22 Mar 2019 15:59:04 +0000 (11:59 -0400)]
Add support for %(trimr) format function

Add support for a %(trimr) format function, which behaves exactly
like %(trim) but also returns a string.  Turns out this is literally
a one-line change that does not require a new format instruction.

7 years agoReplaced use of hard-coded sizes with sizeof the char arrays.
David Levine [Tue, 13 Nov 2018 21:53:20 +0000 (16:53 -0500)]
Replaced use of hard-coded sizes with sizeof the char arrays.

Fix to commit 23024ffad75d997bf2a85b3a65fbfdfd35f8150c.

7 years agoAdded CONTEXT section to fmttest man page.
David Levine [Sat, 10 Nov 2018 17:38:01 +0000 (12:38 -0500)]
Added CONTEXT section to fmttest man page.

7 years agoAdded -attendee switch to mhical(1).
David Levine [Sat, 10 Nov 2018 17:35:31 +0000 (12:35 -0500)]
Added -attendee switch to mhical(1).

This allows the user to select which of their attendee addresses they are
responding about, when they have more than one in the invitation.
Added corresponding -a switch to calaccept, etc., functions in replaliases.
Updated mhical to retain DESCRIPTION lines.  Gmail puts a link to the event
DESCRIPTION line along with a message to no edit that section, though it
seems to accept responses if the DESCRIPTION line was removed.
Incremented mhical version number to 0.5.

7 years agoReduced quantities of data that could be written to a few buffers.
David Levine [Sat, 3 Nov 2018 19:03:17 +0000 (15:03 -0400)]
Reduced quantities of data that could be written to a few buffers.

gcc 8 noticed that snprintfs could have overrun the buffers.

7 years agoIncreased sizes of a couple of buffers.
David Levine [Thu, 1 Nov 2018 23:44:32 +0000 (19:44 -0400)]
Increased sizes of a couple of buffers.

gcc 8 noticed that snprintf could have overrun them.  It might be
better to reduce the sizes of buffers used for display names, etc.
Or ever better, use dynamically sized buffers.

7 years agoResized buffer, and moved it to the only block where it's used.
David Levine [Wed, 31 Oct 2018 23:09:33 +0000 (19:09 -0400)]
Resized buffer, and moved it to the only block where it's used.

gcc 8 noticed that snprintf could have overrun it.

7 years agoResized buffer and provided timezone its own buffer.
David Levine [Wed, 31 Oct 2018 22:51:23 +0000 (18:51 -0400)]
Resized buffer and provided timezone its own buffer.

gcc 8 noticed that snprintfs could have overrun them.

7 years agoAdded full output test to test-scan.
David Levine [Wed, 31 Oct 2018 02:01:05 +0000 (22:01 -0400)]
Added full output test to test-scan.

From commit f54674f1b5d07148d9655fc3b337ad5f725272a7.  The test
fails now, so added to XFAIL_TESTS.

7 years agoRevert "scan(1) now checks for full output device [Bug #50925]."
David Levine [Tue, 30 Oct 2018 01:54:08 +0000 (21:54 -0400)]
Revert "scan(1) now checks for full output device [Bug #50925]."

This reverts commit f54674f1b5d07148d9655fc3b337ad5f725272a7.

7 years agoscan(1) now checks for full output device [Bug #50925].
David Levine [Sun, 28 Oct 2018 18:27:39 +0000 (14:27 -0400)]
scan(1) now checks for full output device [Bug #50925].

Added fflush(3) after every output line:  may slow down scan on
output with large number of lines.

7 years agoAdded PROFILE COMPONENTS section and corrected CONTEXT.
David Levine [Sun, 28 Oct 2018 14:47:40 +0000 (10:47 -0400)]
Added PROFILE COMPONENTS section and corrected CONTEXT.

7 years agoCorrected comment: whom(1) does not use context_foil().
David Levine [Sun, 28 Oct 2018 14:45:08 +0000 (10:45 -0400)]
Corrected comment: whom(1) does not use context_foil().

7 years agoIncreased sizes of a couple of buffers.
David Levine [Sat, 22 Sep 2018 13:50:44 +0000 (09:50 -0400)]
Increased sizes of a couple of buffers.

gcc 8 noticed that snprintfs could have overrun them.

7 years agoCheck for /etc/centos-release, on CentOS.
David Levine [Sat, 22 Sep 2018 13:12:51 +0000 (09:12 -0400)]
Check for /etc/centos-release, on CentOS.

7 years agoruserpass.c: Return the password typed by the user.
Ralph Corderoy [Sun, 1 Jul 2018 08:49:28 +0000 (09:49 +0100)]
ruserpass.c: Return the password typed by the user.

Darren Provine reported that entering the password didn't work.  This
was due to ruserpass() failing to set the password.  Fixes 1d4977af.

7 years agomhlsbr.c: Use variable for strncpy(3)'s size, not sizeof.
Ralph Corderoy [Sun, 1 Jul 2018 08:43:05 +0000 (09:43 +0100)]
mhlsbr.c: Use variable for strncpy(3)'s size, not sizeof.

Silences gcc 8.1.1's warning that the size of the source was being used,
not the destination.  The destination has just been allocated to be the
size of the source so no overflow can occur.  Move existing variable
that later holds the buffer size to before the allocation and strncpy so
it can be used for those too.

7 years agopost.c: Remove `pure' attribute from void-returning chkadr().
Ralph Corderoy [Sun, 1 Jul 2018 08:36:25 +0000 (09:36 +0100)]
post.c: Remove `pure' attribute from void-returning chkadr().

Spoted by gcc 8.1.1.  Fixes 93a18dd7.

7 years agorcvtty.c: Use struct utmpx's ut_line[], not a copy.
Ralph Corderoy [Sun, 1 Jul 2018 08:32:28 +0000 (09:32 +0100)]
rcvtty.c: Use struct utmpx's ut_line[], not a copy.

Silences gcc 8.1.1's warning that strncpy(3)'s length is the sizeof of
the source, not the destination, by removing the strncpy and passing the
source to alert() where it's only read, not written.

7 years agoman: Use `.B' instead of `.BR' when only one argument.
Ralph Corderoy [Thu, 31 May 2018 12:35:19 +0000 (13:35 +0100)]
man: Use `.B' instead of `.BR' when only one argument.

7 years agoThe sendmail config component/switch can be used with sendmail/smtp mts.
David Levine [Thu, 31 May 2018 01:20:22 +0000 (21:20 -0400)]
The sendmail config component/switch can be used with sendmail/smtp mts.

As well as with sendmail/pipe.

8 years agoChange the default editor from 'vi' to 'prompter'.
Ken Hornstein [Sun, 18 Mar 2018 02:34:14 +0000 (22:34 -0400)]
Change the default editor from 'vi' to 'prompter'.

Absent any profile environment variable setting, the default editor
for commands like 'comp', 'forw', and others is now the nmh program
'prompter'.

8 years agoFixed mhshow/test-charset to work on all tested platforms.
David Levine [Tue, 20 Feb 2018 02:30:17 +0000 (21:30 -0500)]
Fixed mhshow/test-charset to work on all tested platforms.

Restores the functionality of commit f81046da6.  Also, skips the
last two tests if iconv isn't enabled.  And removes the test
files if the last test, without iconv_elides_question_marks, behaves
as expected.  Finally, some comments have been updated.

8 years agoAvoid free() in format engine for now.
Ken Hornstein [Mon, 12 Feb 2018 21:01:08 +0000 (16:01 -0500)]
Avoid free() in format engine for now.

This free() call messes up the buffer handling in scansbr.c:scan();
for now we're going to live with the leak and fix this properly when
we normalize the format engine's memory handling.

8 years agocpstripped(): Replace malloc()s with statics based on MB_LEN_MAX.
Ralph Corderoy [Sun, 11 Feb 2018 13:02:24 +0000 (13:02 +0000)]
cpstripped(): Replace malloc()s with statics based on MB_LEN_MAX.

MB_CUR_MAX from stdlib.h isn't a compile-time constant so can't be used
for the size of a couple of static char arrays so malloc() was used at
run time, with the tiny claims never being freed.  valgrind(1) noticed
and David suggested MB_LEN_MAX from limits.h instead;  that header's
contents are suitable for #if expressions and thus compile-time
constants.

8 years agoRemove extra semicolons at end of C statements.
Ralph Corderoy [Fri, 9 Feb 2018 18:51:59 +0000 (18:51 +0000)]
Remove extra semicolons at end of C statements.

8 years agotrunccpy(): Fix typo in comment describing function.
Ralph Corderoy [Wed, 7 Feb 2018 23:24:11 +0000 (23:24 +0000)]
trunccpy(): Fix typo in comment describing function.

8 years agomhshowsbr.c: Delete single-use global int `nolist'.
Ralph Corderoy [Tue, 23 Jan 2018 18:20:16 +0000 (18:20 +0000)]
mhshowsbr.c: Delete single-use global int `nolist'.

Was only used in one place for its value that was always zero.

8 years agoAdd a few more MacOS X valgrind suppressions
Ken Hornstein [Sat, 10 Feb 2018 06:29:46 +0000 (01:29 -0500)]
Add a few more MacOS X valgrind suppressions

8 years agoClean up memory leaks by callers of scan().
Ken Hornstein [Sat, 10 Feb 2018 04:15:32 +0000 (23:15 -0500)]
Clean up memory leaks by callers of scan().

Make sure we reuse the "scanl" argument to the scan() function, as that's
the signal to have scan() reuse it's buffers.  Otherwise repeated calls
to scan will leak a TON of memory.  Reported by Ralph Corderoy.

8 years agoCompile the header format for each message.
David Levine [Fri, 9 Feb 2018 00:43:56 +0000 (19:43 -0500)]
Compile the header format for each message.

Per Ken's suggestion, compile_header() and compile_marker() are now
called for each message.  That's done with reset_comptable disabled.
So, per Ralph's suggestion, fmt_free(NULL, 1) is called after all
messages are shown to free up memory held by the component table.

8 years agoGeneralized gdbm 1.13 Memcheck:Param suppression a bit.
David Levine [Fri, 9 Feb 2018 00:21:55 +0000 (19:21 -0500)]
Generalized gdbm 1.13 Memcheck:Param suppression a bit.

gdbm 1.13-3 (Fedora 27) doesn't show the __write_nocancel call.

8 years agoFixed mhshow part markers when displaying multiple messages.
David Levine [Thu, 8 Feb 2018 01:43:59 +0000 (20:43 -0500)]
Fixed mhshow part markers when displaying multiple messages.

Added test/mhshow/test-markers, it reveals the problem.

8 years agoSuppress unused parameter warning in builds without Cyrus SASL support.
David Levine [Sat, 3 Feb 2018 18:49:24 +0000 (13:49 -0500)]
Suppress unused parameter warning in builds without Cyrus SASL support.

8 years agoSupport building without Cyrus SASL or TLS.
David Levine [Sat, 3 Feb 2018 18:48:10 +0000 (13:48 -0500)]
Support building without Cyrus SASL or TLS.

If the user doesn't specify -y, and specifies n for either Cyrus
SASL or TLS when asked.

8 years agoRemoved unused hf_encoding from struct hfield.
David Levine [Sat, 3 Feb 2018 13:03:24 +0000 (08:03 -0500)]
Removed unused hf_encoding from struct hfield.

I could not find any evidence of it ever being used.

8 years agoRemoved comment about testing noiconv portion of get_param_value().
David Levine [Sat, 3 Feb 2018 13:00:36 +0000 (08:00 -0500)]
Removed comment about testing noiconv portion of get_param_value().

I'm not sure if it ever did, but it doesn't seem to now.

8 years agotest-charset: Fix test when HAVE_ICONV is false.
Ralph Corderoy [Sat, 3 Feb 2018 10:49:40 +0000 (10:49 +0000)]
test-charset: Fix test when HAVE_ICONV is false.

When the Content-Type's charset parameter's encoding is `invalid', it
makes no difference whether HAVE_ICONV is defined or not as the
parameter's value can't be decoded.

8 years agodecode_rfc2047(): Stop unused-variable warning if HAVE_ICONV false.
Ralph Corderoy [Sat, 3 Feb 2018 10:46:23 +0000 (10:46 +0000)]
decode_rfc2047(): Stop unused-variable warning if HAVE_ICONV false.

8 years agoseq_nameok(): Distinguish three identical error messages.
Ralph Corderoy [Thu, 25 Jan 2018 00:28:45 +0000 (00:28 +0000)]
seq_nameok(): Distinguish three identical error messages.

Otherwise `illegal sequence name' doesn't say what's wrong.

8 years agotest-charset: Divulge mhshow output if iconv_open(3) doesn't gripe.
Ralph Corderoy [Thu, 25 Jan 2018 00:16:15 +0000 (00:16 +0000)]
test-charset: Divulge mhshow output if iconv_open(3) doesn't gripe.

Andy Bradford was finding the grep failed, but was left with no
explanation that's what happened, or what the file that didn't match
contained.

8 years ago%(divide): Avoid SIGFPE on integer divide of INT_MIN by -1.
Ralph Corderoy [Wed, 24 Jan 2018 00:27:01 +0000 (00:27 +0000)]
%(divide): Avoid SIGFPE on integer divide of INT_MIN by -1.

Dividing by zero isn't the only cause of SIGFPE.
    fmttest -raw -format '%(num -2147483648) %(divide -1)' foo
Also, add FIXME comment suggesting the user should be told of overflow
rather than silently using zero as the result.

8 years agoUse trim_suffix_c() to remove optional trailing character.
Ralph Corderoy [Wed, 24 Jan 2018 00:12:59 +0000 (00:12 +0000)]
Use trim_suffix_c() to remove optional trailing character.

I'm unsure if one of the cases can know the string's length is long
enough to read the char before the NUL.  Using trim_suffix_c()
simplifies and removes the possibility.

8 years agomhfixmsg.man: Replace UTF-8 `§' with `\(sc' troff escape.
Ralph Corderoy [Wed, 24 Jan 2018 13:49:06 +0000 (13:49 +0000)]
mhfixmsg.man: Replace UTF-8 `§' with `\(sc' troff escape.

man page source is ASCII.  GNU groff's troff's source is ISO 8859-1.
The `§' in UTF-8 looks like `§' in ISO 8859-1.  If those two bytes make
it to a UTF-8 terminal then it appears as `§', but target something
else, e.g. PDF, and the flaw shows.

Also adjust test-manpages to grep for bytes other than HT, and SPACE to
tilde, in the built man pages.  A test of the source could be also be
done for the Makefile's `all' target, but this one should remain to spot
the build process breaking things, e.g. non-ASCII in $prefix.

8 years agoFixed RFC reference in mhfixmsg man page.
David Levine [Wed, 24 Jan 2018 01:10:27 +0000 (20:10 -0500)]
Fixed RFC reference in mhfixmsg man page.

RFC 5322 has line length limits.

8 years agofmt_scan(): Avoid undefined behaviour from overlapping strncpy(3).
Ralph Corderoy [Tue, 23 Jan 2018 16:37:01 +0000 (16:37 +0000)]
fmt_scan(): Avoid undefined behaviour from overlapping strncpy(3).

M. Levinson pointed out in private email that pcc(1) tickles a bug that
causes undefined behaviour due to part of `buffer[]', accessed by `str',
being strncpy(3) back to its start.  Fix by using memmove(3) to slide
`str' back to `buffer's beginning whenever it may have wandered off.

Fixes e8635a8a that added `%(unquote)', but using `%(trim)' twice was
also faulty in the same way and pre-dates git.

8 years agomhshow: Avoid SEGV when user's command has two or fewer words.
Ralph Corderoy [Tue, 23 Jan 2018 09:18:34 +0000 (09:18 +0000)]
mhshow: Avoid SEGV when user's command has two or fewer words.

After argsplit() returned a NULL-terminated vector, the existing NULL
was overwritten with another and the vector index then incremented.
This made the test for whether vec[2] was available out by one resulting
in NULL being used and printed.

This plucking of the third word is a faulty assumption as argsplit()
doesn't always return ["sh", "-c", ...], but add a new test script for
it to avoid regression and so that the script can be expanded with more
related tests.

Fixes 7559e1ebf.

8 years agotest-whom: Send whom's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 11:48:30 +0000 (11:48 +0000)]
test-whom: Send whom's stderr down pipe; don't discard.

Fixes 2a02eef3.

8 years agotest-msgchk: Send msgchk's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 11:45:32 +0000 (11:45 +0000)]
test-msgchk: Send msgchk's stderr down pipe; don't discard.

Present since original 26ac907a.

8 years agotest: Send command's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 11:38:24 +0000 (11:38 +0000)]
test: Send command's stderr down pipe; don't discard.

Fixes 880ff2a4 that turned `foo >$actual 2>&1' into
`foo | sed ... >$actual 2>&1'.

8 years agotest/common.sh.in: Unset libcurl(3)'s proxy environment variables.
Ralph Corderoy [Sat, 20 Jan 2018 08:57:40 +0000 (08:57 +0000)]
test/common.sh.in: Unset libcurl(3)'s proxy environment variables.

Debian's packager, Alexander Zanger, reported test/oauth/test-* problems
due to environment variables for the system's network proxies.  David
Levine suggested the unsetting of them.  The tests only make HTTP
connections so just the variables affecting those are unset.

8 years agotest-subpart: Send mhshow's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 07:33:36 +0000 (07:33 +0000)]
test-subpart: Send mhshow's stderr down pipe; don't discard.

Fixes 2f1e191a.

8 years agotest-textcharset: Send mhshow's stderr down pipe; don't discard.
Ralph Corderoy [Sat, 20 Jan 2018 07:28:29 +0000 (07:28 +0000)]
test-textcharset: Send mhshow's stderr down pipe; don't discard.

Fixes 67bb0fc0.

8 years agoRemoved quotes around "%{charset}" in mhbuild-convert-text.
David Levine [Fri, 19 Jan 2018 02:46:13 +0000 (21:46 -0500)]
Removed quotes around "%{charset}" in mhbuild-convert-text.

They broke test/repl/test-convert on Cygwin.  It looks like parameter
quoting differs between mhbuild and mhshow.

Fix to commit 47629e9e87a324531be881cebfca38dd38f8afaa.

8 years agoRemoved quotes from charset argument to iconv.
David Levine [Fri, 19 Jan 2018 01:21:40 +0000 (20:21 -0500)]
Removed quotes from charset argument to iconv.

Fix to commit 47629e9e87a324531be881cebfca38dd38f8afaa.  Ken
noticed that it broke test/repl/test-convert on MacOS X.

8 years agoFilter test output to remove added whitespace.
David Levine [Fri, 19 Jan 2018 00:03:52 +0000 (19:03 -0500)]
Filter test output to remove added whitespace.

Ralph noticed that lynx added whitespace to the (empty) converted
html document, breaking the test.

Fix to commit 47629e9e87a324531be881cebfca38dd38f8afaa.