Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36882e98 authored by Daniel Zheng's avatar Daniel Zheng
Browse files

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
parent 21aab6cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ class ZstdDecompressor final : public IDecompressor {
            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);