$OpenBSD: patch-pine_mailcap_c,v 1.1 2002/12/01 20:57:10 jakob Exp $
--- pine/mailcap.c.orig	Mon Nov 18 22:47:22 2002
+++ pine/mailcap.c	Sun Dec  1 15:17:46 2002
@@ -921,14 +921,18 @@ mc_cmd_bldr(controlstring, type, subtype
 		     * have to put those outside of the single quotes.
 		     * (The parm+1000 nonsense is to protect against
 		     * malicious mail trying to overlow our buffer.)
+		     *
+		     * TCH - Change 2/8/1999
+		     * Also quote the ` slash to prevent execution of arbitrary code
 		     */
 		    for(p = parm; *p && p < parm+1000; p++){
-			if(*p == '\''){
+			if((*p == '\'') || (*p=='`')) {
 			    *to++ = '\'';  /* closing quote */
 			    *to++ = '\\';
-			    *to++ = '\'';  /* below will be opening quote */
-			}
-			*to++ = *p;
+			    *to++ = *p;		/* quoted character */
+			    *to++ = '\'';	/* opening quote */
+			} else
+			    *to++ = *p;
 		    }
 
 		    fs_give((void **) &parm);
