Fix segmentation fault in tar(1)

This commit is contained in:
FRIGN 2015-03-03 11:26:59 +01:00
parent 0b9c02cd22
commit c8f2b068f6

5
tar.c
View File

@ -85,13 +85,14 @@ putoctal(char *dst, unsigned num, int n)
static int
archive(const char* path)
{
FILE *f;
FILE *f = NULL;
mode_t mode;
struct group *gr;
struct header *h;
struct passwd *pw;
struct stat st;
size_t chksum, l, x;
size_t chksum, x;
ssize_t l;
unsigned char b[BLKSIZ];
lstat(path, &st);