Skip to content

Commit ca72046

Browse files
authored
Merge pull request moby#5362 from tonistiigi/input-digest-validation
llbsolver: add input validation to policy recompute
2 parents 8445ccf + 7d5a06c commit ca72046

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

solver/llbsolver/vertex.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ func recomputeDigests(ctx context.Context, all map[digest.Digest]*pb.Op, visited
203203
if dgst, ok := visited[dgst]; ok {
204204
return dgst, nil
205205
}
206-
op := all[dgst]
206+
op, ok := all[dgst]
207+
if !ok {
208+
return "", errors.Errorf("invalid missing input digest %s", dgst)
209+
}
207210

208211
var mutated bool
209212
for _, input := range op.Inputs {

0 commit comments

Comments
 (0)