Skip to content

uncramfs-lzma stops after successfully decoding the first block #137

@GoogleCodeExporter

Description

@GoogleCodeExporter
When processing a LZMA-compressed file, uncramfs-lzma stops after successfully 
uncompressing the first file block.

As a consequence, files larger than the block size are truncated after the 
first block (the rest of the file is filled with zeros).

I'm not sure how it was working so far, except when processing CramFS images 
with only "small" files (i.e., files smaller than the LZMA block size).


The following patch should fix the problem:

--- a/lzma-uncramfs.c   2014-08-27 10:18:37.660841457 +0200
+++ b/lzma-uncramfs.c   2014-08-27 10:18:45.336841358 +0200
@@ -114,10 +114,6 @@
     fprintf(stderr,"Uncompression failed");
     return -1;
       }
-      else
-      {
-         return 0;
-      }
    }
    return 0;
 }

Original issue reported on code.google.com by roberto.paleari@gmail.com on 27 Aug 2014 at 8:23

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions