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...
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user