blob: f306a508d9234c05bc26af124fd8b3b81e2fcee7 (
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 2008/02/13 10:20:57 rillig 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 {
|