aboutsummaryrefslogtreecommitdiffstats
path: root/archivers/rzip/files/patch-main.c
blob: ba89703ef58c20120de0fb8e448c33642aa3f718 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);