diff options
Diffstat (limited to 'archivers/rzip/patches')
-rw-r--r-- | archivers/rzip/patches/patch-aa | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/archivers/rzip/patches/patch-aa b/archivers/rzip/patches/patch-aa new file mode 100644 index 00000000000..6f47ed7bb82 --- /dev/null +++ b/archivers/rzip/patches/patch-aa @@ -0,0 +1,28 @@ +$NetBSD: patch-aa,v 1.1.1.1 2004/08/29 15:29:04 recht Exp $ + +--- main.c.orig Thu Aug 26 23:31:21 2004 ++++ main.c Thu Aug 26 23:35:52 2004 +@@ -18,6 +18,7 @@ + /* rzip compression - main program */ + + #include "rzip.h" ++#include <assert.h> + + static void usage(void) + { +@@ -138,9 +139,14 @@ + fatal("%s: unknown suffix\n", control->infile); + } + +- control->outfile = strndup(control->infile, ++ control->outfile = malloc(strlen(control->infile) - ++ strlen(control->suffix) + 1); ++ assert(control->outfile); ++ strncpy(control->outfile, control->infile, + strlen(control->infile) - + strlen(control->suffix)); ++ *(control->outfile + strlen(control->infile) - ++ strlen(control->suffix)) = '\0'; + } + + fd_in = open(control->infile,O_RDONLY); |