Module Name: src
Committed By: bouyer
Date: Mon May 18 20:00:49 UTC 2009
Modified Files:
src/usr.bin/paste [netbsd-5]: paste.c
Log Message:
Pull up following revision(s) (requested by dholland in ticket #766):
usr.bin/paste/paste.c: revision 1.15
Null-terminate the delimiter list string after processing escapes
(which can shorten it) because the code that issues delimiters depends
on it being null-terminated. This caused e.g. paste -d '\0' a b to
print a '0' at the beginning of each line. Closes PR 41159.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.4.1 src/usr.bin/paste/paste.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/paste/paste.c
diff -u src/usr.bin/paste/paste.c:1.14 src/usr.bin/paste/paste.c:1.14.4.1
--- src/usr.bin/paste/paste.c:1.14 Mon Jul 21 14:19:24 2008
+++ src/usr.bin/paste/paste.c Mon May 18 20:00:49 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: paste.c,v 1.14 2008/07/21 14:19:24 lukem Exp $ */
+/* $NetBSD: paste.c,v 1.14.4.1 2009/05/18 20:00:49 bouyer Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -40,7 +40,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)paste.c 8.1 (Berkeley) 6/6/93";*/
-__RCSID("$NetBSD: paste.c,v 1.14 2008/07/21 14:19:24 lukem Exp $");
+__RCSID("$NetBSD: paste.c,v 1.14.4.1 2009/05/18 20:00:49 bouyer Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -221,6 +221,7 @@
if (!cnt)
errx(1, "no delimiters specified.");
+ *arg = '\0';
return(cnt);
}