With bad luck, lzma_code() could return LZMA_BUF_ERROR
when it shouldn't.
This has been here since the early days of liblzma.
It got triggered by the modifications made to the xz
tool in commit 18c10c30d2
but only when decompressing .lzma files. Somehow I managed
to miss testing that with Valgrind earlier.
This fixes <http://bugs.gentoo.org/show_bug.cgi?id=305591>.
Thanks to Rafał Mużyło for helping to debug it on IRC.
lzma_block.version has to be initialized even for
lzma_block_header_decode(). This way a future version
of liblzma won't allocate memory in a way that an old
application doesn't know how to free it.
The subtlety of this change is that all current apps
using lzma_block_header_decode() will keep working for
now, because the only possible version value is zero,
and lzma_block_header_decode() unconditionally sets the
version to zero even now. Unless fixed, these apps will
break in the future if a new version of the Block options
is ever needed.
The old Makefile + config.h was deleted, because it
becomes outdated too easily and building with the
Autotools based build system works fine even on Windows.
windows/build.sh hasn't got much testing, but it should
work to build 32-bit x86 and x86-64 versions of XZ Utils
using MSYS, MinGW or MinGW-w32, and MinGW-w64.
windows/INSTALL-Windows.txt describes what packages are
needed and how to install them.
windows/README-Windows.txt is a readme file for the binary
package that build.sh hopefully builds.
There are no instructions about using Autotools for now,
so those using a git snapshot may want to run
"autoreconf -fi && ./configure && make mydist" on a UN*X
box and then copy the resulting .tar.gz to a Windows.
If signal handlers haven't been established, then it's
useless to try to block them, especially since the sigset_t
used for blocking hasn't been initialized yet.
The opening of the destination file is now delayed a little.
The coder is initialized, and if decompressing, the memory
usage of the first Block compared against the memory
usage limit before the destination file is opened. This
means that if --force was used, the old "target" file won't
be deleted so easily when something goes wrong very early.
Thanks to Mark K for the bug report.
The above fix required some changes to progress message
handling. Now there is a separate function for setting and
printing the filename. It is used also in list.c.
list_file() now handles stdin correctly (gives an error).
A useless check for user_abort was removed from file_io.c.
This is a bit rough but should be useful for basic things.
Ideas (with detailed examples) about the output format are
welcome.
The output of --robot --list is not necessarily stable yet,
although I don't currently have any plans about changing it.
The man page hasn't been updated yet.
Thanks to Dan Shechter for the patch.
It is likely that windows/Makefile will be removed
completely, because Autotols based build nowadays
works well with both 32-bit and 64-bit MinGW (I
just need to update the docs).
to stdout even if --force is used.
--force will still enable compression of symlinks, but only
in case they point to a regular file.
The new way simply seems more reasonable. It matches gzip's
behavior while the old one matched bzip2's behavior.
This breaks API and ABI but most apps are not affected
since most apps don't use this part of the API. You will
get a compile error if you are using anything that got
broken.
Summary of changes:
- Ability to store Stream Flags, which are needed
for random-access reading in multi-Stream files.
- Separate function to set size of Stream Padding.
- Iterator structure makes it possible to read the same
lzma_index from multiple threads at the same time.
- A lot faster code to locate Blocks.
- Removed lzma_index_equal() without adding anything
to replace it. I don't know what it should do exactly
with the new features and what actually needs this
function in the first place other than test_index.c,
which now has its own code to compare lzma_indexes.
Since the *.gmo files are deleted by the maintainer-clean target,
I assume they are not meant to be tracked.
Also add the other files listed in the Makefile’s clean targets
(stamp-poT, xz.po, xz.[12].po, *.new.po, xz.mo) to make sure they
are not accidentally tracked. Most of these are intermediate
files that would not appear unless a build is interrupted or
fails.
Split the list of untracked files by origin to make it easier to
tell if files are missing in the future.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks to Marek Černocký.
Other people planning to translate xz: Note that the
messages are a little bit in flux still. Translations
are still welcome, just be prepared to some extra work
in case there are changes.