Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jan 2009 16:23:21 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187828 - head/sbin/restore
Message-ID:  <200901281623.n0SGNLYL026034@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Wed Jan 28 16:23:21 2009
New Revision: 187828
URL: http://svn.freebsd.org/changeset/base/187828

Log:
  Restore necessary NUL termination of locname.
  
  Submitted by:	ian dowse
  MFC after:	2 days

Modified:
  head/sbin/restore/interactive.c

Modified: head/sbin/restore/interactive.c
==============================================================================
--- head/sbin/restore/interactive.c	Wed Jan 28 15:54:28 2009	(r187827)
+++ head/sbin/restore/interactive.c	Wed Jan 28 16:23:21 2009	(r187828)
@@ -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?200901281623.n0SGNLYL026034>