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.
GetLayerinpkg/buildpack/oci_layout_package.goindexeso.manifest.Layers[index]without checking the index againstlen(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.