commit | ec3b83e7307e23319bfa8f1d175107421df2b97e | [log] [tgz] |
---|---|---|
author | Tricia Landers <planders@google.com> | Mon Mar 12 18:21:30 2018 -0700 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Fri Mar 16 23:13:31 2018 +0000 |
tree | caed13ad53fc0fff0aaf4b8eed9d40682935d413 | |
parent | b6041c74fccdc65f142cdfda1a5c84cc4c4dc59d [diff] |
[sparse] Only declare out of range if decompressed buffer is empty ZX-1821 #done Change-Id: Iedd0fe7cee0797b2e267fb1f4636171c570414fd
diff --git a/system/ulib/fvm/fvm-lz4.cpp b/system/ulib/fvm/fvm-lz4.cpp index 1f617e3..d81c80b 100644 --- a/system/ulib/fvm/fvm-lz4.cpp +++ b/system/ulib/fvm/fvm-lz4.cpp
@@ -146,7 +146,7 @@ #endif size_t total_size = 0; if (compressed_) { - if (to_read_ == 0) { + if (out_buf_.is_empty() && to_read_ == 0) { // There is no more to read return ZX_ERR_OUT_OF_RANGE; }