summaryrefslogtreecommitdiff
path: root/cmd/extract_apks/main.go
diff options
context:
space:
mode:
author Ray Chin <raychin@google.com> 2023-09-23 04:09:18 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-09-23 04:09:18 +0000
commit4ad574cc37f23d36428d8947dd3f29bcacdb0ef4 (patch)
tree1481d6f9c9e69ab4d1f36e4992c9eab15d064776 /cmd/extract_apks/main.go
parent7c5b6d5273472f50f27597ece38f59e645c9826c (diff)
parent0523ee828a78135b70b6f220c306d97919697143 (diff)
Merge "Fix read file error in extract_apks" into main
Diffstat (limited to 'cmd/extract_apks/main.go')
-rw-r--r--cmd/extract_apks/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/extract_apks/main.go b/cmd/extract_apks/main.go
index 2e71fe15e..a7308b471 100644
--- a/cmd/extract_apks/main.go
+++ b/cmd/extract_apks/main.go
@@ -76,8 +76,8 @@ func (apkSet *ApkSet) getToc() (Toc, error) {
if err != nil {
return nil, err
}
- bytes := make([]byte, tocFile.FileHeader.UncompressedSize64)
- if _, err := rc.Read(bytes); err != nil && err != io.EOF {
+ bytes, err := io.ReadAll(rc)
+ if err != nil {
return nil, err
}
rc.Close()