Skip to content

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

@schneekatze

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions