buger/jsonparser

infinite loop in Delete

wangcong15 opened this issue · 3 comments

Hi. A call to function Delete may cause infinite loop. I wish you could take a look.
https://play.golang.org/p/kzKY-Z9ty_j

package main

import (
	"fmt"
	"github.com/buger/jsonparser"
)

func main() {
	data1 := []byte("^_�^C^A^@[")
	data2 := ""
	
	// sink: this function leads to an inifinite loop
	jsonparser.Delete(data1, data2)
	
	// code go hanged. So the last line won't be printed
	fmt.Println("Things go right!")
}

This issue appears to have been assigned CVE-2020-10675.

Gf

This is grrsy