-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dns.ParseZone() parsing error leading to nil pointer dereference #742
Comments
You're fuzzing the text parser? If so, good.
Are you able to send a PR/fix for this?
[ Quoting <notifications@github.com> in "[miekg/dns] dns.ParseZone() parsing..." ]
### What did I do?
PoC.go
```golang
package main
import (
"fmt"
"strings"
"github.com/miekg/dns"
)
func main() {
r := strings.NewReader(` Ta 0 0 0`)
for x := range dns.ParseZone(r, "", "") {
if x.Error != nil {
fmt.Println(x.Error)
} else if x == nil {
// This should never be reached
fmt.Println("x == NIL")
} else {
// Do something with x.RR
fmt.Println(x.RR.String())
}
}
return
}
```
### What happened?
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x65a762]
goroutine 1 [running]:
main.main()
/path/to/gopath/src/fuzz/dns/worker/main.go:20 +0x122
exit status 2
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#742
/Miek
…--
Miek Gieben
|
@miekg |
[ Quoting <notifications@github.com> in "Re: [miekg/dns] dns.ParseZone() par..." ]
@miekg
I will take a look this tomorrow or a few day : )
thanks!
|
Merged
#745 didn't have the magic commit message that would have closed this issue. |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did I do?
PoC.go
What happened?
The text was updated successfully, but these errors were encountered: