mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
xl: Fix typo in PutObjectPart when part size is 10Mb (#6574)
PutObjectPart forgot to allocate buffer memory when the size of the uploaded part is exactly equal to blockSizeV1 = 10 Mb.
This commit is contained in:
parent
ca6f795504
commit
66d911653f
@ -359,7 +359,7 @@ func (xl xlObjects) PutObjectPart(ctx context.Context, bucket, object, uploadID
|
||||
switch size := data.Size(); {
|
||||
case size == 0:
|
||||
buffer = make([]byte, 1) // Allocate atleast a byte to reach EOF
|
||||
case size == -1 || size > blockSizeV1:
|
||||
case size == -1 || size >= blockSizeV1:
|
||||
buffer = xl.bp.Get()
|
||||
defer xl.bp.Put(buffer)
|
||||
case size < blockSizeV1:
|
||||
|
Loading…
Reference in New Issue
Block a user