[hackers] [sbase] Fix segmentation fault in tar(1) || FRIGN

From: <git_AT_suckless.org>
Date: Tue, 3 Mar 2015 14:32:27 +0100 (CET)

commit e8ba6c5fa6171af0dce27875d40e2d60ee78c437
Author: FRIGN <dev_AT_frign.de>
Date: Tue Mar 3 11:26:59 2015 +0100

    Fix segmentation fault in tar(1)

diff --git a/tar.c b/tar.c
index bdf34b8..e0e6240 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -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);
Received on Tue Mar 03 2015 - 14:32:27 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 03 2015 - 14:36:37 CET