restrict parse fil string length (#4780)
This commit is contained in:
parent
95d9084899
commit
3ec25cbece
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user