1
0
mirror of https://github.com/golang/go synced 2024-11-17 02:14:42 -07:00

archive: error check when parse archive

This commit is contained in:
James Yang 2023-01-05 23:56:35 +08:00
parent bae7d772e8
commit 5a17f9aa2c

View File

@ -368,7 +368,10 @@ func (r *objReader) parseArchive(verbose bool) error {
if bytes.Equal(p, goobjHeader) {
typ = EntryGoObj
o = &GoObj{}
r.parseObject(o, size)
err := r.parseObject(o, size)
if err != nil {
return err
}
} else {
typ = EntryNativeObj
r.skip(size)