On Thu, Mar 13, 2008 at 2:14 PM, Myles Watson mylesgw@gmail.com wrote:
This patch changes do_nrv2b_compress to act like do_lzma_compress. In other words, it now allocates and frees its own memory. This saves lar from having to know about worst case compression to avoid memory corruption.
Tested by building coreboot with nrv2b as default, then copying to an lzma lar, then copying back to an nrv2b lar. No differences.
This patch adds comments to lar_compress, do_lzma_compress, and do_nrv2b_compress. It also checks to make sure that the compressed size is smaller than the input size before copying the data back.
Myles
Signed-off-by: Myles Watson mylesgw@gmail.com