xgo/tengo.go
Daniel 0c5e80b057
Limit the maximum size of string/bytes values (#121)
* add tengo.MaxStringLen and tengo.MaxBytesLen to limit the maximum byte-length of string/bytes values

* add couple more tests
2019-03-01 10:48:02 -08:00

11 lines
340 B
Go

package tengo
var (
// MaxStringLen is the maximum byte-length for string value.
// Note this limit applies to all compiler/VM instances in the process.
MaxStringLen = 2147483647
// MaxBytesLen is the maximum length for bytes value.
// Note this limit applies to all compiler/VM instances in the process.
MaxBytesLen = 2147483647
)