Merge "Check for overflow before allocating memory fore decompression." am: c1d2c15785

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1430148

Change-Id: I80c6ebef9c311c0a97e1b4d57a54d457a24c4115