burntsushi-toml: Fixes out-of-memory crash (#8297)

This commit is contained in:
manunio 2022-08-19 09:07:29 +05:30 committed by GitHub
parent 0b8040e9be
commit 444a4feafe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,11 @@ package toml
import "bytes"
func FuzzToml(data []byte) int {
if len(data) >= 10240 {
return 0
}
buf := make([]byte, 0, 2048)
var m interface{}