diff options
author | imp <imp@FreeBSD.org> | 2009-01-28 16:23:21 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2009-01-28 16:23:21 +0000 |
commit | 5cbdce783bd4925f5a830d13c274b2c77fe993a3 (patch) | |
tree | 99e6002c65edf251d31c1eb20b5a351998c7d595 | |
parent | 1b8c1baf109fbc7f8e3b07ab93f25a5884fb15b9 (diff) | |
download | FreeBSD-src-5cbdce783bd4925f5a830d13c274b2c77fe993a3.zip FreeBSD-src-5cbdce783bd4925f5a830d13c274b2c77fe993a3.tar.gz |
Restore necessary NUL termination of locname.
Submitted by: ian dowse
MFC after: 2 days
-rw-r--r-- | sbin/restore/interactive.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/restore/interactive.c b/sbin/restore/interactive.c index 1fffd28..c977df1 100644 --- a/sbin/restore/interactive.c +++ b/sbin/restore/interactive.c @@ -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); |