Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jun 2009 06:59:47 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r195043 - stable/7/sbin/restore
Message-ID:  <200906260659.n5Q6xlfp078117@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Jun 26 06:59:47 2009
New Revision: 195043
URL: http://svn.freebsd.org/changeset/base/195043

Log:
  Merge r187828: restore necessary NUL termination.

Modified:
  stable/7/sbin/restore/   (props changed)
  stable/7/sbin/restore/interactive.c

Modified: stable/7/sbin/restore/interactive.c
==============================================================================
--- stable/7/sbin/restore/interactive.c	Fri Jun 26 06:40:12 2009	(r195042)
+++ stable/7/sbin/restore/interactive.c	Fri Jun 26 06:59:47 2009	(r195043)
@@ -545,6 +545,7 @@ printlist(char *name, char *basename)
 			     strcmp(dp->d_name, ".") == 0 ||
 			     strcmp(dp->d_name, "..") == 0))
 				continue;
+			locname[namelen] = '\0';
 			if (namelen + dp->d_namlen >= MAXPATHLEN) {
 				fprintf(stderr, "%s%s: name exceeds %d char\n",
 					locname, dp->d_name, MAXPATHLEN);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906260659.n5Q6xlfp078117>