From 9a873ed69348fea217a58b7da52b7b22bf4995ef Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 12 Apr 2009 16:21:46 +0200 Subject: [PATCH] Fixed a bug with non-appending multi-session and zisofs decompression. --- libisofs/filters/zisofs.c | 7 ++++++- libisofs/fs_image.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libisofs/filters/zisofs.c b/libisofs/filters/zisofs.c index ec89896..033d2ea 100644 --- a/libisofs/filters/zisofs.c +++ b/libisofs/filters/zisofs.c @@ -565,7 +565,12 @@ int ziso_stream_uncompress(IsoStream *stream, void *buf, size_t desired) /* Delivering data blocks */; i = ++(rng->block_pointer_rpos); if (i >= rng->block_pointer_fill) { - /* More data blocks than announced */ + if (rng->out_counter == data->size) { + rng->state = 3; + rng->block_pointer_rpos--; + return fill; + } + /* More data blocks needed than announced */ return (rng->error_ret = ISO_FILTER_WRONG_INPUT); } todo = rng->block_pointers[i] - rng->block_pointers[i- 1]; diff --git a/libisofs/fs_image.c b/libisofs/fs_image.c index 8d8159b..86c2c40 100644 --- a/libisofs/fs_image.c +++ b/libisofs/fs_image.c @@ -1142,8 +1142,10 @@ int iso_file_source_new_ifs(IsoImageFilesystem *fs, IsoFileSource *parent, size_t cs_value_length = 0; char msg[160]; +#ifdef Libisofs_with_zliB uint8_t zisofs_alg[2], zisofs_hs4 = 0, zisofs_bsl2 = 0; uint32_t zisofs_usize = 0; +#endif if (fs == NULL || fs->data == NULL || record == NULL || src == NULL) { return ISO_NULL_POINTER;