Use hash.NewLimitReader for internal multipart calls (#17191)

This commit is contained in:
Poorna
2023-05-12 11:19:08 -07:00
committed by GitHub
parent 203755793c
commit e07c2ab868
9 changed files with 91 additions and 11 deletions
+1 -1
View File
@@ -2088,7 +2088,7 @@ func (er erasureObjects) restoreTransitionedObject(ctx context.Context, bucket s
// rehydrate the parts back on disk as per the original xl.meta prior to transition
for _, partInfo := range oi.Parts {
hr, err := hash.NewReader(gr, partInfo.Size, "", "", partInfo.Size)
hr, err := hash.NewLimitReader(gr, partInfo.Size, "", "", partInfo.Size)
if err != nil {
return setRestoreHeaderFn(oi, err)
}