aboutsummaryrefslogtreecommitdiff
path: root/archivers/rzip/files/patch-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'archivers/rzip/files/patch-main.c')
-rw-r--r--archivers/rzip/files/patch-main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/archivers/rzip/files/patch-main.c b/archivers/rzip/files/patch-main.c
new file mode 100644
index 000000000000..ba89703ef58c
--- /dev/null
+++ b/archivers/rzip/files/patch-main.c
@@ -0,0 +1,15 @@
+--- main.c.orig Thu Feb 12 01:01:08 2004
++++ main.c Fri Apr 9 18:28:33 2004
+@@ -137,10 +137,8 @@
+ strlen(control->infile) - strlen(control->suffix)) != 0) {
+ fatal("%s: unknown suffix\n", control->infile);
+ }
+-
+- control->outfile = strndup(control->infile,
+- strlen(control->infile) -
+- strlen(control->suffix));
++ control->outfile = malloc(strlen(control->infile) - strlen(control->suffix) + 1);
++ strncpy(control->outfile, control->infile, strlen(control->infile) - strlen(control->suffix));
+ }
+
+ fd_in = open(control->infile,O_RDONLY);