Skip to content

ociLayoutPackage.GetLayer panics on an out-of-range layer index #2655

Description

@arpitjain099

GetLayer in pkg/buildpack/oci_layout_package.go indexes o.manifest.Layers[index] without checking the index against len(o.manifest.Layers), so a layer index that exceeds the number of layers in the manifest causes an index-out-of-range panic instead of a returned error. This is reachable when the manifest and config disagree on layer count. #2651 adds the bounds check and a regression test; filing this to track the fix.

Metadata

Metadata

Assignees

Labels

status/readyIssue ready to be worked on.type/bugIssue that reports an unexpected behaviour.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions