mirror of
https://github.com/containers/skopeo.git
synced 2026-07-15 06:55:09 +00:00
Don't panic if an image's ID can't be parsed
Return a "doesn't match" result if an image's ID can't be turned into a valid reference for any reason. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> Closes: #217 Approved by: rhatdan
This commit is contained in:
committed by
Atomic Bot
parent
83fe25ca4e
commit
98c4e0d970
@@ -297,7 +297,7 @@ func matchesDangling(name string, dangling string) bool {
|
||||
func matchesLabel(image storage.Image, store storage.Store, label string) bool {
|
||||
storeRef, err := is.Transport.ParseStoreReference(store, "@"+image.ID)
|
||||
if err != nil {
|
||||
|
||||
return false
|
||||
}
|
||||
img, err := storeRef.NewImage(nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user