zenutils/update_extract: make sure the archive is valid
commit2f1da04cc340c74d194335c286e14e0428496d21
authorAmaury Pouly <amaury.pouly@gmail.com>
Wed, 27 Jun 2012 12:51:56 +0000 (27 14:51 +0200)
committerAmaury Pouly <amaury.pouly@gmail.com>
Wed, 27 Jun 2012 12:56:20 +0000 (27 14:56 +0200)
tree960466fc3ebf28ab3c92e239a18c2ded5d3ed012
parent7c9e7ec707b9aa9e40c8e7ebdbbf1138cef85bb1
zenutils/update_extract: make sure the archive is valid

The update_extract tool works by finding the compressed size and
the compressed data in the updater. This is problematic since
without the uncompressed size, inflate can produce extra bytes
at end. This is not a problem for our tools but the device will
plain reject it if sent by MTP/sendfirm for example.
Workaround this issue by reading and rewriting the archive
after decompression so that only the meaningfull data is written.

Change-Id: I117f434b92a56d93d269af49c3e426cd8cc0c7e4
utils/zenutils/source/update_extract/main.cpp