Skip to content

Commit

Permalink
Fix 32-bit constant overflow
Browse files Browse the repository at this point in the history
This prevented compilation on arm7 systems like Raspberry Pi.
Fixes #724.
  • Loading branch information
gaul authored and kahing committed Nov 2, 2022
1 parent 829d8e5 commit f960f45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/backend_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ func (s *S3Backend) mpuCopyPart(from string, to string, mpuId string, bytes stri
}

func sizeToParts(size int64) (int, int64) {
const MAX_S3_MPU_SIZE = 5 * 1024 * 1024 * 1024 * 1024
const MAX_S3_MPU_SIZE int64 = 5 * 1024 * 1024 * 1024 * 1024
if size > MAX_S3_MPU_SIZE {
panic(fmt.Sprintf("object size: %v exceeds maximum S3 MPU size: %v", size, MAX_S3_MPU_SIZE))
}
Expand Down

0 comments on commit f960f45

Please sign in to comment.