Merge pull request #804 from filecoin-project/fix/retrieve-large

Fix retrieval of large files
This commit is contained in:
Łukasz Magiera
2019-12-09 16:28:47 +01:00
committed by GitHub
9 changed files with 159 additions and 124 deletions
+4 -2
View File
@@ -105,7 +105,8 @@ func (t *PaymentInfo) UnmarshalCBOR(r io.Reader) error {
if err != nil {
return err
}
if extra > 8192 {
if extra > cbg.MaxLength {
return fmt.Errorf("t.Vouchers: array too large (%d)", extra)
}
@@ -244,7 +245,8 @@ func (t *SealedRefs) UnmarshalCBOR(r io.Reader) error {
if err != nil {
return err
}
if extra > 8192 {
if extra > cbg.MaxLength {
return fmt.Errorf("t.Refs: array too large (%d)", extra)
}