mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
"0" offset is ignored in GetObject method in Azure Gateway code (#5118)
In GetObject method, Check if startoffset is a non-negative value. Ignore check for startOffset > and check for only length > 0. Fixes minio/mint#191
This commit is contained in:
parent
95d97c2d6d
commit
a011fe8450
@ -469,8 +469,13 @@ func (a *azureObjects) ListObjectsV2(bucket, prefix, continuationToken, delimite
|
||||
// startOffset indicates the starting read location of the object.
|
||||
// length indicates the total length of the object.
|
||||
func (a *azureObjects) GetObject(bucket, object string, startOffset int64, length int64, writer io.Writer) error {
|
||||
// startOffset cannot be negative.
|
||||
if startOffset < 0 {
|
||||
return toObjectErr(traceError(errUnexpected), bucket, object)
|
||||
}
|
||||
|
||||
blobRange := &storage.BlobRange{Start: uint64(startOffset)}
|
||||
if length > 0 && startOffset > 0 {
|
||||
if length > 0 {
|
||||
blobRange.End = uint64(startOffset + length - 1)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user