vboot: Fix decompression error when loading legacy boot image.

When compressing legacy ELF image with large heap / stack (ex, 1M), legacy boot
may report decompression error and abort.

The reason is right now we compare ulzman results with expected destination
size. However, the return value of ulzman may be smaller than dst_len (mem_len)
because mem_len contains BSS section data. We should only abort if the return
value is zero.

BUG=chrome-os-partner:24981
TEST=emerge-nyan depthcharge chromeos-bootimage # pass and boots legacy blobs
BRANCH=nyan

Change-Id: Ic5237b7c14b1517573740daf89a00069b187297e
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/200040
Reviewed-by: Julius Werner <jwerner@chromium.org>
1 file changed