commit | a97cdddf914132230b830ac322bb3ff2f190a092 | [log] [tgz] |
---|---|---|
author | Ulya Trafimovich <skvadrik@google.com> | Wed Sep 28 11:22:09 2022 +0100 |
committer | Treehugger Robot <treehugger-gerrit@google.com> | Wed Sep 28 16:43:58 2022 +0000 |
tree | 7ee4858451e7d5a6ea38a53c6e6d872758f93f4d | |
parent | aebf927633059672e6fc0c0b332051d76fc1ef96 [diff] |
Check if return value from `LZ4_decompress_safe()` is negative. `LZ4_decompress_safe()` returns an `int`, which was previously cast to `size_t` without checking for possible negative values. This hides possible errors (they hit the following assertion that decompressed size equals image size). Instead, fail to decompress the image if return value is negative. Bug: 242914915 Test: art/test.py --host Change-Id: I0e330bbbd55ccbef124230b6b50915ea8d009b03