summaryrefslogtreecommitdiff
path: root/sysutils/mc46/patches/patch-su
blob: 9276296e8f7994b81aa31879a96242dd7739f815 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-su,v 1.1.1.1 2011/01/23 14:31:56 wiz Exp $

Old bash versions required octal characters with 3 digits, newer
versions (>= 2.05) require 4 digits.

--- src/subshell.c.orig	2007-08-14 14:25:55.000000000 +0200
+++ src/subshell.c	2007-08-14 14:37:39.000000000 +0200
@@ -728,8 +728,8 @@ subshell_name_quote (const char *s)
 	    if (isalpha ((unsigned char) *s)) {
 		*d++ = (unsigned char) *s;
 	    } else {
-		sprintf (d, "\\%03o", (unsigned char) *s);
-		d += 4;
+		sprintf (d, "\\%04o", (unsigned char) *s);
+		d += 5;
 	    }
 	}
     } else {