Package: dash
Version: 0.5.2-8
Severity: normal
Tags: patch, upstream

Here is a simple test case:

#!/bin/dash
echo test\\ test
echo '\c'
echo test\\ test

it outputs:
test\ test
test\

instead of
test\ test
test\ test

This is due to mis-usage of a global variable. See attached patch for a
fix.

This bug has for side effect to break some autoconf generated scripts with
dash in some corner cases. (see #211010 and #256384)

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-1-686
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)

Versions of packages dash depends on:
ii  libc6                         2.3.5-7    GNU C Library: Shared libraries an

dash recommends no packages.

-- debconf information excluded
diff -rN -u5 dash-0.5.2/src/bltin/printf.c dash-0.5.2.new/src/bltin/printf.c
--- dash-0.5.2/src/bltin/printf.c	2004-07-09 11:58:46.000000000 +0200
+++ dash-0.5.2.new/src/bltin/printf.c	2005-11-03 14:29:05.623352408 +0100
@@ -516,10 +516,12 @@
 		nonl = ~nonl;
 		if (!*++argv)
 			goto end;
 	}
 
+	rval = 0;
+
 	do {
 		char c;
 
 		c = *(*argv)++;
 		if (!c)

Reply via email to