Skip to content

possible nil dereference in (*conn).QueryContext #1173

@streamer45

Description

@streamer45

We've received a report of a panic on version v1.10.9 (Golang go1.21.8)

runtime.errorString: runtime error: invalid memory address or nil pointer dereference
  File "github.com/lib/[email protected]/conn_go18.go", line 31, in (*conn).QueryContext
  File "database/sql/ctxutil.go", line 48, in ctxDriverQuery
  File "database/sql/sql.go", line 1748, in (*DB).queryDC.func1
  File "database/sql/sql.go", line 3502, in withLock
  File "database/sql/sql.go", line 1743, in (*DB).queryDC
  File "database/sql/sql.go", line 1726, in (*DB).query
  File "database/sql/sql.go", line 1704, in (*DB).QueryContext.func1
  File "database/sql/sql.go", line 1538, in (*DB).retry
  File "database/sql/sql.go", line 1703, in (*DB).QueryContext
  File "github.com/jmoiron/[email protected]/sqlx_context.go", line 171, in (*DB).QueryRowxContext
  File "github.com/jmoiron/[email protected]/sqlx_context.go", line 82, in GetContext
  File "github.com/jmoiron/[email protected]/sqlx_context.go", line 147, in (*DB).GetContext

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions