mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-01-09 10:00:27 +01:00
Fix invalid free error when -o and -S are used together.
This commit is contained in:
parent
081265f1c9
commit
0d6944bd3f
6
main.c
6
main.c
|
|
@ -281,13 +281,11 @@ int main(int argc, char *argv[])
|
|||
failure("Invalid nice value (must be -20..19)\n");
|
||||
break;
|
||||
case 'o':
|
||||
if (control->outdir)
|
||||
failure("Cannot have -o and -O together\n");
|
||||
if (control->outdir || control->suffix)
|
||||
failure("Cannot have -o and -O or -S together\n");
|
||||
if (unlikely(STDOUT))
|
||||
failure("Cannot specify an output filename when outputting to stdout\n");
|
||||
control->outname = optarg;
|
||||
free(control->suffix);
|
||||
control->suffix = "";
|
||||
break;
|
||||
case 'O':
|
||||
if (control->outname) /* can't mix -o and -O */
|
||||
|
|
|
|||
Loading…
Reference in a new issue