Subject: pkg/9695: Updates/fixes to the nmh package
To: None <gnats-bugs@gnats.netbsd.org>
From: None <eric@cirr.com>
List: netbsd-bugs
Date: 03/28/2000 16:08:47
>Number: 9695
>Category: pkg
>Synopsis: Update nmh home page, fix problem with nmh
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager (NetBSD software packages system bug manager)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 28 16:09:00 2000
>Last-Modified:
>Originator: Eric Schnoebelen
>Organization:
Eric Schnoebelen eric@cirr.com http://www.cirr.com
Men of lofty genius when they are doing the least work are most active.
-Leonardo da Vinci
>Release: pkgsrc 2000-03-28
>Environment:
System: NetBSD egsner 1.3.3 NetBSD 1.3.3 (GENERIC) #0: Fri Dec 11 16:21:49 PST 1998 root@struis:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
The package home page for nmh is no longer up to date, it is
now http://www.mhost.com/nmh.
Additionally, the 1.0.3 update to nmh has problems with
over/mis-quoting of strings being passed to the shell,
creating problems attempting to display some multi-part
MIME content.
I have generated a patch that corrects the problem. It is
enclosed below, along with a patch updating the HOMEPAGE
in the package Makefile.
The supplied source patch has already been submitted
to nmh-bugs@mhost.com.
>How-To-Repeat:
Attempt to read a multi-part MIME message??
>Fix:
diff -urP nmh/Makefile nmh-new/Makefile
--- nmh/Makefile Thu Mar 16 07:44:53 2000
+++ nmh-new/Makefile Tue Mar 28 17:31:27 2000
@@ -8,7 +8,7 @@
ftp://ftp.gw.com/pub/unix/mail/mh/nmh/
MAINTAINER= kim@tac.nyc.ny.us
-HOMEPAGE= http://www.math.gatech.edu/nmh/
+HOMEPAGE= http://www.mhost.com/nmh/
CONFLICTS= ja-mh-*
diff -urP nmh/files/patch-sum nmh-new/files/patch-sum
--- nmh/files/patch-sum Wed Mar 1 23:11:45 2000
+++ nmh-new/files/patch-sum Tue Mar 28 17:25:30 2000
@@ -3,3 +3,4 @@
MD5 (patch-ca) = ba8bde6090ca48b315ac84f6a3c04f2d
MD5 (patch-cb) = 9045625460e75f206c0f11ab0c4a74e6
MD5 (patch-cc) = 14aab99374bf88d3d661ca795fdd2af8
+MD5 (patch-cz) = 71bd763b06e033a8dd254b008e171fa4
diff -urP nmh/patches/patch-cz nmh-new/patches/patch-cz
--- nmh/patches/patch-cz Wed Dec 31 18:00:00 1969
+++ nmh-new/patches/patch-cz Tue Mar 28 16:33:08 2000
@@ -0,0 +1,42 @@
+--- uip/mhshowsbr.c.orig Sun Mar 26 19:43:12 2000
++++ uip/mhshowsbr.c Tue Mar 28 16:29:47 2000
+@@ -405,7 +405,16 @@
+
+ case 'f':
+ /* insert filename containing content */
+- snprintf (bp, buflen, "%s", file);
++ snprintf (bp, buflen, "'%s'", file);
++ /* since we've quoted the file argument, set things up
++ * to look past it, to avoid problems with the quoting
++ * logic below. (I know, I should figure out what's
++ * broken with the quoting logic, but..)
++ */
++ len = strlen(bp);
++ buflen -= len;
++ bp += len;
++ pp = bp;
+ break;
+
+ case 'p':
+@@ -869,8 +878,9 @@
+ quoted = 0;
+
+ /* Now parse display string */
+- for ( ; *cp; cp++) {
++ for ( ; *cp && buflen > 0; cp++) {
+ if (*cp == '%') {
++ pp = bp;
+ switch (*++cp) {
+ case 'a':
+ /* insert parameters from Content-Type field */
+@@ -923,6 +933,10 @@
+ buflen -= len;
+ s = " ";
+ }
++ /* set our starting pointer back to bp, to avoid
++ * requoting the filenames we just added
++ */
++ pp = bp;
+ }
+ break;
+
>Audit-Trail:
>Unformatted: