Open
Description
When the data contains a large string length as in the example below, decodeString tries to allocate all of this memory upfront so the program crashes.
package main
import (
"bytes"
"fmt"
"github.com/jackpal/bencode-go"
)
func main() {
data := []byte("99999999999:")
buf := bytes.NewBuffer(data)
res, err := bencode.Decode(buf)
fmt.Println(res, err)
}
Metadata
Metadata
Assignees
Labels
No labels