commit | 36882e98b4b33d48949cfcc3700f39f24489bebd | [log] [tgz] |
---|---|---|
author | Daniel Zheng <zhengdaniel@google.com> | Tue Aug 15 13:32:48 2023 -0700 |
committer | Daniel Zheng <zhengdaniel@google.com> | Thu Aug 17 14:18:56 2023 -0700 |
tree | fc1637a88c7aa6f306fadb4e05398cc091d8b6fb | |
parent | 21aab6cb8384c3e7d53118c9684b450c7604b4b7 [diff] |
ZSTD read from wrong buf Fix zstd to read from ignore_buf rather than buf since that is where we are first copying the date Test: zstd ota Change-Id: I5032300e4628ecd7e49f1fa9f76dc9a828fb58e6
diff --git a/fs_mgr/libsnapshot/libsnapshot_cow/cow_decompress.cpp b/fs_mgr/libsnapshot/libsnapshot_cow/cow_decompress.cpp index 3692c1a..2aaf388 100644 --- a/fs_mgr/libsnapshot/libsnapshot_cow/cow_decompress.cpp +++ b/fs_mgr/libsnapshot/libsnapshot_cow/cow_decompress.cpp
@@ -351,7 +351,7 @@ return decompressed_size; } std::vector<unsigned char> ignore_buf(decompressed_size); - if (!Decompress(buffer, decompressed_size)) { + if (!Decompress(ignore_buf.data(), decompressed_size)) { return -1; } memcpy(buffer, ignore_buf.data() + ignore_bytes, buffer_size);