Browse Source

Merge pull request #2256 from porter-dev/nafees/hotfixes

[POR-603] [hotfix] Case on possible nil pointer value of `ImageTag` from ECR API response
abelanger5 3 years ago
parent
commit
ada9c8f6f6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      internal/registry/registry.go

+ 3 - 1
internal/registry/registry.go

@@ -707,7 +707,9 @@ func (r *Registry) GetECRPaginatedImages(
 	imageIDMap := make(map[string]bool)
 
 	for _, id := range resp.ImageIds {
-		imageIDMap[*id.ImageTag] = true
+		if id != nil && id.ImageTag != nil {
+			imageIDMap[*id.ImageTag] = true
+		}
 	}
 
 	var wg sync.WaitGroup