diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-12-13 01:52:39 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-12-13 01:52:39 +0000 |
commit | bd193a42a5624f0a72b5f99d554e9a8d2afc64cc (patch) | |
tree | 7aacebe98730fbfee623943425a100fd158ba48a /tar.c | |
parent | 77508b29fa63d99136fc09f00c5a2addd6331b4c (diff) | |
download | busybox-w32-bd193a42a5624f0a72b5f99d554e9a8d2afc64cc.tar.gz busybox-w32-bd193a42a5624f0a72b5f99d554e9a8d2afc64cc.tar.bz2 busybox-w32-bd193a42a5624f0a72b5f99d554e9a8d2afc64cc.zip |
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...
Diffstat (limited to 'tar.c')
-rw-r--r-- | tar.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -691,13 +691,11 @@ extern int readTarFile(int tarFd, int extractFlag, int listFlag, | |||
691 | struct tm *tm = localtime (&(header.mtime)); | 691 | struct tm *tm = localtime (&(header.mtime)); |
692 | 692 | ||
693 | len=printf("%s ", mode_string(header.mode)); | 693 | len=printf("%s ", mode_string(header.mode)); |
694 | memset(buf, 0, 8*sizeof(char)); | ||
695 | my_getpwuid(buf, header.uid); | 694 | my_getpwuid(buf, header.uid); |
696 | if (! *buf) | 695 | if (! *buf) |
697 | len+=printf("%d", header.uid); | 696 | len+=printf("%d", header.uid); |
698 | else | 697 | else |
699 | len+=printf("%s", buf); | 698 | len+=printf("%s", buf); |
700 | memset(buf, 0, 8*sizeof(char)); | ||
701 | my_getgrgid(buf, header.gid); | 699 | my_getgrgid(buf, header.gid); |
702 | if (! *buf) | 700 | if (! *buf) |
703 | len+=printf("/%-d ", header.gid); | 701 | len+=printf("/%-d ", header.gid); |