Skip to content

Unhandled error in select.go causes a nil pointer dereference #708

Description

@schneekatze

In github.com/upper/db/v4@v4.7.0/internal/sqlbuilder/select.go:428 a possible error is ignored.

func (sel *selector) statement() *exql.Statement {
	sq, _ := sel.build()
	return sq.statement()
}

If an error takes place, sq can be nil, resulting into a panic "runtime error: invalid memory address or nil pointer dereference".

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions