NetBSD Problem Report #9695

Received: (qmail 24908 invoked from network); 29 Mar 2000 00:06:44 -0000
Message-Id: <200003290006.SAA29268@egsner.cirr.com>
Date: Tue, 28 Mar 2000 18:06:42 -0600 (CST)
From: eric@cirr.com
Reply-To: eric@cirr.com
To: gnats-bugs@gnats.netbsd.org
Subject: Updates/fixes to the nmh package
X-Send-Pr-Version: 3.95

>Number:         9695
>Category:       pkg
>Synopsis:       Update nmh home page, fix problem with nmh
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 28 16:09:00 +0000 2000
>Closed-Date:    Sat Apr 15 07:59:39 +0000 2000
>Last-Modified:  Sat Apr 15 07:59:39 +0000 2000
>Originator:     Eric Schnoebelen
>Release:        pkgsrc 2000-03-28
>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
>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;
+ 
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: simonb 
State-Changed-When: Sat Apr 15 00:58:54 PDT 2000 
State-Changed-Why:  
I've upgraded the nmh package to 1.0.4 which includes your patch. 
Also updated the homepage as requested. 

Thanks! 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.