From 444a4feafe9460c4d95bcca163dda513d6ce9f9c Mon Sep 17 00:00:00 2001 From: manunio Date: Fri, 19 Aug 2022 09:07:29 +0530 Subject: [PATCH] burntsushi-toml: Fixes out-of-memory crash (#8297) --- projects/burntsushi-toml/fuzz.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/burntsushi-toml/fuzz.go b/projects/burntsushi-toml/fuzz.go index bc721c65a..f1afaf8bd 100644 --- a/projects/burntsushi-toml/fuzz.go +++ b/projects/burntsushi-toml/fuzz.go @@ -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{}