diff options
author | Alice Atlas <alice@lant.is> | 2017-12-04 21:07:31 (GMT) |
---|---|---|
committer | Alice Atlas <alice@lant.is> | 2017-12-04 21:07:31 (GMT) |
commit | 42a31aee50ec325fbba93ce405ab83c25fc710e1 (patch) | |
tree | ba5787f80f98974852c419dd5c313df66a97c3ed /programs | |
parent | 6c94c94d4673bd2c0bc3ff80ca17cff8c19a465a (diff) | |
download | lz4-42a31aee50ec325fbba93ce405ab83c25fc710e1.zip lz4-42a31aee50ec325fbba93ce405ab83c25fc710e1.tar.gz lz4-42a31aee50ec325fbba93ce405ab83c25fc710e1.tar.bz2 |
Fix bug which could sometimes result in the lz4 cli chmodding /dev/null if running as root
Diffstat (limited to 'programs')
-rw-r--r-- | programs/lz4io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c index 57434f7..9bf4e93 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -616,7 +616,7 @@ static int LZ4IO_compressFilename_extRess(cRess_t ress, const char* srcFileName, /* Copy owner, file permissions and modification time */ { stat_t statbuf; - if (strcmp (srcFileName, stdinmark) && strcmp (dstFileName, stdoutmark) && UTIL_getFileStat(srcFileName, &statbuf)) + if (strcmp (srcFileName, stdinmark) && strcmp (dstFileName, stdoutmark) && strcmp (dstFileName, nulmark) && UTIL_getFileStat(srcFileName, &statbuf)) UTIL_setFileStat(dstFileName, &statbuf); } |