Skip to content

infinite loop in Delete #188

Description

@wangcong15

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!")
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions