Commit d4875cd3 authored by Tianjie Xu's avatar Tianjie Xu
Browse files

Fix the bspatch failure on an empty brotli stream

When we close the BrotliDecompressor, we check for
BrotliDecoderIsFinished(). This function may return false if we never
call BrotliDecoderDecompressStream(), leading to a failure in bspatch
in case of an empty brotli stream.

This CL fixes the issue by checking BrotliDecoderIsUsed() along with
IsFinished(). Since we have the compressed stream and the precomputed
uncompressed size in the patch; we need these checks to avoid unexpected
size mismatch.

Bug: 69472150
Test: unittest pass
Change-Id: Icf7b324836fa59fd3111ba91b03622215a0c8f5f
parent 2ab0083e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment