1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
xz-archive/src
Lasse Collin bb0b1004f8 xz: Multiple fixes.
The code assumed that printing numbers with thousand separators
and decimal points would always produce only US-ASCII characters.
This was used for buffer sizes (with snprintf(), no overflows)
and aligning columns of the progress indicator and --list. That
assumption was wrong (e.g. LC_ALL=fi_FI.UTF-8 with glibc), so
multibyte character support was added in this commit. The old
way is used if the operating system doesn't have enough multibyte
support (e.g. lacks wcwidth()).

The sizes of buffers were increased to accomodate multibyte
characters. I don't know how big they should be exactly, but
they aren't used for anything critical, so it's not too bad.
If they still aren't big enough, I hopefully get a bug report.
snprintf() takes care of avoiding buffer overflows.

Some static buffers were replaced with buffers allocated on
stack. double_to_str() was removed. uint64_to_str() and
uint64_to_nicestr() now share the static buffer and test
for thousand separator support.

Integrity check names "None" and "Unknown-N" (2 <= N <= 15)
were marked to be translated. I had forgot these, plus they
wouldn't have worked correctly anyway before this commit,
because printing tables with multibyte strings didn't work.

Thanks to Marek Černocký for reporting the bug about
misaligned table columns in --list output.
2010-09-10 10:30:33 +03:00
..
common xz: Multiple fixes. 2010-09-10 10:30:33 +03:00
liblzma Don't set lc=4 with --extreme. 2010-09-04 22:16:28 +03:00
lzmainfo Language fixes for man pages. 2010-07-28 11:44:55 +03:00
scripts Fix xzgrep to not break if filenames have spaces or quotes. 2010-03-07 19:52:25 +02:00
xz xz: Multiple fixes. 2010-09-10 10:30:33 +03:00
xzdec Disable the memory usage limiter by default. 2010-08-07 20:45:18 +03:00
Makefile.am Add lzmainfo for backward compatibility with LZMA Utils. 2009-08-13 12:55:45 +03:00