Fix segmentation fault in tar(1)
This commit is contained in:
parent
0b9c02cd22
commit
c8f2b068f6
5
tar.c
5
tar.c
|
@ -85,13 +85,14 @@ putoctal(char *dst, unsigned num, int n)
|
||||||
static int
|
static int
|
||||||
archive(const char* path)
|
archive(const char* path)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f = NULL;
|
||||||
mode_t mode;
|
mode_t mode;
|
||||||
struct group *gr;
|
struct group *gr;
|
||||||
struct header *h;
|
struct header *h;
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
size_t chksum, l, x;
|
size_t chksum, x;
|
||||||
|
ssize_t l;
|
||||||
unsigned char b[BLKSIZ];
|
unsigned char b[BLKSIZ];
|
||||||
|
|
||||||
lstat(path, &st);
|
lstat(path, &st);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user