Skip to content

Commit

Permalink
Merge pull request #2619 from giuseppe/docker-image-src-check-too-man…
Browse files Browse the repository at this point in the history
…y-parts

docker: add check for too many parts
  • Loading branch information
mtrmac authored Nov 12, 2024
2 parents 8a7f0b1 + a521836 commit 0c42f2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/docker_image_src.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ func handle206Response(streams chan io.ReadCloser, errs chan error, body io.Read
}
return
}
if parts >= len(chunks) {
errs <- errors.New("too many parts returned by the server")
break
}
s := signalCloseReader{
closed: make(chan struct{}),
stream: p,
Expand Down

0 comments on commit 0c42f2f

Please sign in to comment.