This commit is contained in:
Anton Medvedev
2023-09-06 09:42:58 +02:00
parent 3c4d579704
commit e2c14ca624
+1 -1
View File
@@ -32,7 +32,7 @@ func unescape(value string) (string, error) {
// The string contains escape characters.
// The following logic is adapted from `strconv/quote.go`
var runeTmp [utf8.UTFMax]byte
if n >= 2/3*math.MaxInt {
if n >= 2*math.MaxInt/3 {
return "", fmt.Errorf("too large string")
}
buf := make([]byte, 0, 3*n/2)