From 38ca178cf3956cc37b5495a3220d524117a4e060 Mon Sep 17 00:00:00 2001 From: Ivan Andreev Date: Sun, 20 Feb 2022 23:29:40 +0300 Subject: [PATCH] mailru: fix int32 overflow on arm32 - fixes #6003 --- backend/mailru/api/m1.go | 4 ++-- backend/mailru/mailru.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/mailru/api/m1.go b/backend/mailru/api/m1.go index aba700a2f..039b1e104 100644 --- a/backend/mailru/api/m1.go +++ b/backend/mailru/api/m1.go @@ -58,7 +58,7 @@ type UserInfoResponse struct { AutoProlong bool `json:"auto_prolong"` Basequota int64 `json:"basequota"` Enabled bool `json:"enabled"` - Expires int `json:"expires"` + Expires int64 `json:"expires"` Prolong bool `json:"prolong"` Promocodes struct { } `json:"promocodes"` @@ -80,7 +80,7 @@ type UserInfoResponse struct { FileSizeLimit int64 `json:"file_size_limit"` Space struct { BytesTotal int64 `json:"bytes_total"` - BytesUsed int `json:"bytes_used"` + BytesUsed int64 `json:"bytes_used"` Overquota bool `json:"overquota"` } `json:"space"` } `json:"cloud"` diff --git a/backend/mailru/mailru.go b/backend/mailru/mailru.go index 4551eeae7..c1a51cf4a 100644 --- a/backend/mailru/mailru.go +++ b/backend/mailru/mailru.go @@ -1572,7 +1572,7 @@ func (f *Fs) About(ctx context.Context) (*fs.Usage, error) { } total := info.Body.Cloud.Space.BytesTotal - used := int64(info.Body.Cloud.Space.BytesUsed) + used := info.Body.Cloud.Space.BytesUsed usage := &fs.Usage{ Total: fs.NewUsageValue(total),