commit c8f2b068f6639369f1dc329499194b4cbffa77c2
parent 0b9c02cd22507940fe4684e244abda0c714f4d17
Author: FRIGN <dev@frign.de>
Date: Tue, 3 Mar 2015 11:26:59 +0100
Fix segmentation fault in tar(1)
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tar.c b/tar.c
@@ -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);