]> git.ipfire.org Git - thirdparty/zstd.git/commit
zstd: fix crash when not overwriting existing files 972/head
authorPádraig Brady <P@draigBrady.com>
Tue, 2 Jan 2018 15:17:32 +0000 (15:17 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 2 Jan 2018 15:24:09 +0000 (15:24 +0000)
commite0596715dcf57cd431394d923d63dfe5aaf49749
treebf0bbad16177c111495f3f4c4da0094ea42e279b
parent2eff2171366239a129c35aae4cd610661770e812
zstd: fix crash when not overwriting existing files

This fixes the following crash:
  $ touch exists
  $ programs/zstd -r examples/ -o exists
  zstd: exists already exists; not overwritten
  Segmentation fault (core dumped)

* programs/fileio.c (FIO_compressMultipleFilenames):
Handle the case where we're not overwriting the destination.

Reported at https://bugzilla.redhat.com/1530049
programs/fileio.c