Skip to content

runtime error: invalid memory address or nil pointer dereference #26

@scriptzteam

Description

@scriptzteam
lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
go version
go version go1.13.8 linux/amd64
2022/01/27 17:31:05 http2: panic serving 1.2.4.3:59676: runtime error: invalid memory address or nil pointer dereference
goroutine 397 [running]:
net/http.(*http2serverConn).runHandler.func1(0xc000010320, 0xc0000dbf67, 0xc000283200)
        /usr/lib/go-1.13/src/net/http/h2_bundle.go:5706 +0x16b
panic(0xedc140, 0x1921490)
        /usr/lib/go-1.13/src/runtime/panic.go:679 +0x1b2
github.com/miekg/dns.(*Msg).PackBuffer(0x0, 0x0, 0x0, 0x0, 0xc000032050, 0x80, 0x81, 0x0, 0x0)
        /root/go/pkg/mod/github.com/miekg/dns@v1.1.35/msg.go:723 +0x26
github.com/miekg/dns.(*Msg).Pack(...)
        /root/go/pkg/mod/github.com/miekg/dns@v1.1.35/msg.go:716
main.(*targetServer).resolveQueryWithResolver(0xc000140f00, 0xc000480870, 0x116fb20, 0xc00000fd20, 0x0, 0x6c9e0b, 0x1939c80, 0x8, 0xc000063ae0)
        /root/odoh-server-go/target.go:104 +0x1f6
main.(*targetServer).dohQueryHandler(0xc000140f00, 0x1177040, 0xc000010320, 0xc000449200)
        /root/odoh-server-go/target.go:137 +0x340
main.(*targetServer).targetQueryHandler(0xc000140f00, 0x1177040, 0xc000010320, 0xc000449200)
        /root/odoh-server-go/target.go:279 +0x259
net/http.HandlerFunc.ServeHTTP(0xc000378080, 0x1177040, 0xc000010320, 0xc000449200)
        /usr/lib/go-1.13/src/net/http/server.go:2007 +0x44
net/http.(*ServeMux).ServeHTTP(0x1939c80, 0x1177040, 0xc000010320, 0xc000449200)
        /usr/lib/go-1.13/src/net/http/server.go:2387 +0x1bd
net/http.serverHandler.ServeHTTP(0xc00037a000, 0x1177040, 0xc000010320, 0xc000449200)
        /usr/lib/go-1.13/src/net/http/server.go:2802 +0xa4
net/http.initNPNRequest.ServeHTTP(0x117a4c0, 0xc0003679b0, 0xc00038f180, 0xc00037a000, 0x1177040, 0xc000010320, 0xc000449200)
        /usr/lib/go-1.13/src/net/http/server.go:3366 +0x8d
net/http.(*http2serverConn).runHandler(0xc000283200, 0xc000010320, 0xc000449200, 0xc00044c820)
        /usr/lib/go-1.13/src/net/http/h2_bundle.go:5713 +0x9f
created by net/http.(*http2serverConn).processHeaders
        /usr/lib/go-1.13/src/net/http/h2_bundle.go:5447 +0x4eb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions