Skip to content

Commit

Permalink
Merge pull request #5362 from tonistiigi/input-digest-validation
Browse files Browse the repository at this point in the history
llbsolver: add input validation to policy recompute
  • Loading branch information
AkihiroSuda authored Oct 3, 2024
2 parents 8445ccf + 7d5a06c commit ca72046
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion solver/llbsolver/vertex.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ func recomputeDigests(ctx context.Context, all map[digest.Digest]*pb.Op, visited
if dgst, ok := visited[dgst]; ok {
return dgst, nil
}
op := all[dgst]
op, ok := all[dgst]
if !ok {
return "", errors.Errorf("invalid missing input digest %s", dgst)
}

var mutated bool
for _, input := range op.Inputs {
Expand Down

0 comments on commit ca72046

Please sign in to comment.