Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Fix mount loop processing to avoid crash on invalid path #121

Merged
merged 1 commit into from
Jul 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dockerclient/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func ResolveHostPath(mountPath string, client *docker.Client, isUnixSocket bool,
for _, mount := range container.Mounts {
rel, err := filepath.Rel(mount.Destination, mountPath)
if err != nil {
return "", err
continue
}
// The easiest way to check whether the `mountPath` is within the `mount.Destination`
if !strings.HasPrefix(rel, "..") {
Expand Down