Fix read file error in extract_apks

Bug: 301409551
Test: build
Change-Id: I353efea233e524c838298447b08743eeeedbb263
This commit is contained in:
Ray Chin 2023-09-21 20:32:06 +08:00
parent 53b33d07b1
commit 0523ee828a

View file

@ -76,8 +76,8 @@ func (apkSet *ApkSet) getToc() (Toc, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
bytes := make([]byte, tocFile.FileHeader.UncompressedSize64) bytes, err := io.ReadAll(rc)
if _, err := rc.Read(bytes); err != nil && err != io.EOF { if err != nil {
return nil, err return nil, err
} }
rc.Close() rc.Close()