diff --git a/chain/types/fil.go b/chain/types/fil.go index 0ea77660c..3dabb5e77 100644 --- a/chain/types/fil.go +++ b/chain/types/fil.go @@ -61,6 +61,10 @@ func ParseFIL(s string) (FIL, error) { } } + if len(s) > 50 { + return FIL{}, fmt.Errorf("string length too large: %d", len(s)) + } + r, ok := new(big.Rat).SetString(s) if !ok { return FIL{}, fmt.Errorf("failed to parse %q as a decimal number", s)