aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/ulikunitz/xz/reader.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-25 03:08:25 -0700
committerGitHub <noreply@github.com>2021-03-25 03:08:25 -0700
commit95ef8a6f0398e8c62f9d1281638ec95823336c6a (patch)
tree8d1b78f4d0b0d8225cd764de7537a281ca9b937e /vendor/github.com/ulikunitz/xz/reader.go
parentdd32fa833e932959caf4e1dc1b8b060e6372d8bc (diff)
parent9a899da16080df0354e65decfc06dddeefa7920d (diff)
downloadpodman-95ef8a6f0398e8c62f9d1281638ec95823336c6a.tar.gz
podman-95ef8a6f0398e8c62f9d1281638ec95823336c6a.tar.bz2
podman-95ef8a6f0398e8c62f9d1281638ec95823336c6a.zip
Merge pull request #9811 from containers/dependabot/go_modules/github.com/containers/storage-1.28.1
Bump github.com/containers/storage from 1.28.0 to 1.28.1
Diffstat (limited to 'vendor/github.com/ulikunitz/xz/reader.go')
-rw-r--r--vendor/github.com/ulikunitz/xz/reader.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/vendor/github.com/ulikunitz/xz/reader.go b/vendor/github.com/ulikunitz/xz/reader.go
index 795858914..7f974ffc5 100644
--- a/vendor/github.com/ulikunitz/xz/reader.go
+++ b/vendor/github.com/ulikunitz/xz/reader.go
@@ -1,4 +1,4 @@
-// Copyright 2014-2019 Ulrich Kunitz. All rights reserved.
+// Copyright 2014-2021 Ulrich Kunitz. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -160,17 +160,14 @@ func (c ReaderConfig) newStreamReader(xz io.Reader) (r *streamReader, err error)
// readTail reads the index body and the xz footer.
func (r *streamReader) readTail() error {
- index, n, err := readIndexBody(r.xz)
+ index, n, err := readIndexBody(r.xz, len(r.index))
if err != nil {
if err == io.EOF {
err = io.ErrUnexpectedEOF
}
return err
}
- if len(index) != len(r.index) {
- return fmt.Errorf("xz: index length is %d; want %d",
- len(index), len(r.index))
- }
+
for i, rec := range r.index {
if rec != index[i] {
return fmt.Errorf("xz: record %d is %v; want %v",