lytics / confl

Config parser for go, modeled after Nginx format, Nice lenient syntax with Comments
MIT License
138 stars 20 forks source link

Infinite loop on bad input #6

Closed tv42 closed 9 years ago

tv42 commented 9 years ago

Courtesy of https://github.com/dvyukov/go-fuzz

I'll submit a pull request to include this in the tree next..

package main

import (
    "fmt"

    "github.com/lytics/confl"
)

func main() {
    var v map[string]interface{}
    fmt.Println("about to hang")
    confl.Unmarshal([]byte("\x0e9\xbd\xbf\xefr"), &v)
    fmt.Println("never gets here")
}