mildsunrise / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
1 stars 3 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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