diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2022-07-17 21:36:25 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2022-07-24 11:38:19 +0300 |
commit | 0e222bf7d79a9792025c5ffeaa66c8e14eb47615 (patch) | |
tree | 59ecb74e0e565e54bc978e3c2ca1078c08bbf28f /PACKAGERS | |
parent | xzgrep: Fix parsing of certain options. (diff) | |
download | xz-0e222bf7d79a9792025c5ffeaa66c8e14eb47615.tar.xz |
xzgrep: Add more LC_ALL=C to avoid bugs with multibyte characters.
Also replace one use of expr with printf.
The rationale for LC_ALL=C was already mentioned in
69d1b3fc29677af8ade8dc15dba83f0589cb63d6 that fixed a security
issue. However, unrelated uses weren't changed in that commit yet.
POSIX says that with sed and such tools one should use LC_ALL=C
to ensure predictable behavior when strings contain byte sequences
that aren't valid multibyte characters in the current locale. See
under "Application usage" in here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
With GNU sed invalid multibyte strings would work without this;
it's documented in its Texinfo manual. Some other implementations
aren't so forgiving.
Diffstat (limited to 'PACKAGERS')
0 files changed, 0 insertions, 0 deletions