diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2023-09-22 02:33:29 +0300 |
---|---|---|
committer | Jia Tan <jiat0218@gmail.com> | 2023-10-31 18:44:59 +0800 |
commit | 660c8c29e57d30dbd5009ef1f0ec1bbe195ccef6 (patch) | |
tree | ed16e46c14efd606681d0c0bc198c3723147cc85 /po4a/update-po | |
parent | CMake: Wrap two overlong lines that are possible to wrap. (diff) | |
download | xz-660c8c29e57d30dbd5009ef1f0ec1bbe195ccef6.tar.xz |
xz: Windows: Don't (de)compress to special files like "con" or "nul".
Before this commit, the following writes "foo" to the
console and deletes the input file:
echo foo | xz > con_xz
xz --suffix=_xz --decompress con_xz
It cannot happen without --suffix because names like con.xz
are also special and so attempting to decompress con.xz
(or compress con to con.xz) will already fail when opening
the input file.
Similar thing is possible when compressing. The following
writes to "nul" and the input file "n" is deleted.
echo foo | xz > n
xz --suffix=ul n
Now xz checks if the destination is a special file before
continuing. DOS/DJGPP version had a check for this but
Windows (and OS/2) didn't.
Diffstat (limited to 'po4a/update-po')
0 files changed, 0 insertions, 0 deletions