Skip to content

Commit 11d8cef

Browse files
avoid panic in copyObject
1 parent 33e8e5c commit 11d8cef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gofakes3.go

+3
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,9 @@ func (g *GoFakeS3) copyObject(bucket, object string, meta map[string]string, w h
742742

743743
// XXX No support for versionId subresource
744744
parts := strings.SplitN(strings.TrimPrefix(source, "/"), "/", 2)
745+
if len(parts) != 2 {
746+
return ErrInvalidArgument
747+
}
745748
srcBucket := parts[0]
746749
srcKey := strings.SplitN(parts[1], "?", 2)[0]
747750

0 commit comments

Comments
 (0)