Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@schneekatze

Description

@schneekatze

In github.com/upper/db/[email protected]/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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions