From bd193a42a5624f0a72b5f99d554e9a8d2afc64cc Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 13 Dec 2000 01:52:39 +0000 Subject: Fix from Matt Kraai -- a better way to NULL terminate strings for the my_* passwd and group routines. I should have thought of doing it this way... --- archival/tar.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'archival') diff --git a/archival/tar.c b/archival/tar.c index 8c2650e..3a3b7f1 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -691,13 +691,11 @@ extern int readTarFile(int tarFd, int extractFlag, int listFlag, struct tm *tm = localtime (&(header.mtime)); len=printf("%s ", mode_string(header.mode)); - memset(buf, 0, 8*sizeof(char)); my_getpwuid(buf, header.uid); if (! *buf) len+=printf("%d", header.uid); else len+=printf("%s", buf); - memset(buf, 0, 8*sizeof(char)); my_getgrgid(buf, header.gid); if (! *buf) len+=printf("/%-d ", header.gid); -- cgit v1.1