Skip to content

Commit

Permalink
Updated XZ Utils liblzma to 5.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
kratz00 committed Jun 16, 2013
1 parent 80bad1f commit d15fa93
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion liblzma/README.txt
Expand Up @@ -3,7 +3,7 @@ This is the source code to liblzma from XZ Utils:

http://tukaani.org/xz/

This is a snapshot of the xz-5.0.3 release. Changes I've made to it are
This is a snapshot of the xz-5.0.4 release. Changes I've made to it are
wrapped in #if __MOJOSETUP__ blocks. I've tried to agressively delete files
we don't use at all, too.

Expand Down
2 changes: 1 addition & 1 deletion liblzma/api/lzma/version.h
Expand Up @@ -22,7 +22,7 @@
*/
#define LZMA_VERSION_MAJOR 5
#define LZMA_VERSION_MINOR 0
#define LZMA_VERSION_PATCH 3
#define LZMA_VERSION_PATCH 4
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE

#ifndef LZMA_VERSION_COMMIT
Expand Down
7 changes: 5 additions & 2 deletions liblzma/common/index.c
Expand Up @@ -398,10 +398,13 @@ extern LZMA_API(lzma_index *)
lzma_index_init(lzma_allocator *allocator)
{
lzma_index *i = index_init_plain(allocator);
if (i == NULL)
return NULL;

index_stream *s = index_stream_init(0, 0, 1, 0, allocator);
if (i == NULL || s == NULL) {
index_stream_end(s, allocator);
if (s == NULL) {
lzma_free(i, allocator);
return NULL;
}

index_tree_append(&i->streams, &s->node);
Expand Down
5 changes: 1 addition & 4 deletions liblzma/simple/simple_coder.c
Expand Up @@ -35,9 +35,6 @@ copy_or_code(lzma_coder *coder, lzma_allocator *allocator,

} else {
// Call the next coder in the chain to provide us some data.
// We don't care about uncompressed_size here, because
// the next filter in the chain will do it for us (since
// we don't change the size of the data).
const lzma_ret ret = coder->next.code(
coder->next.coder, allocator,
in, in_pos, in_size,
Expand Down Expand Up @@ -110,7 +107,7 @@ simple_code(lzma_coder *coder, lzma_allocator *allocator,
// filtered if the buffer sizes used by the application are reasonable.
const size_t out_avail = out_size - *out_pos;
const size_t buf_avail = coder->size - coder->pos;
if (out_avail > buf_avail) {
if (out_avail > buf_avail || buf_avail == 0) {
// Store the old position so that we know from which byte
// to start filtering.
const size_t out_start = *out_pos;
Expand Down
3 changes: 1 addition & 2 deletions liblzma/simple/simple_private.h
Expand Up @@ -22,8 +22,7 @@ struct lzma_coder_s {
/// Next filter in the chain
lzma_next_coder next;

/// True if the next coder in the chain has returned LZMA_STREAM_END
/// or if we have processed uncompressed_size bytes.
/// True if the next coder in the chain has returned LZMA_STREAM_END.
bool end_was_reached;

/// True if filter() should encode the data; false to decode.
Expand Down

0 comments on commit d15fa93

Please sign in to comment.