fix possible null dereference in internal/statements/query.go #1988

Merged
lunny merged 1 commits from andreasgerstmayr/xorm:query-null-deref into master 2021-07-12 15:51:51 +00:00

View File

@ -314,7 +314,7 @@ func (statement *Statement) genSelectSQL(columnStr string, needLimit, needOrderB
fmt.Fprint(&buf, " LIMIT ", *pLimitN) fmt.Fprint(&buf, " LIMIT ", *pLimitN)
} }
} else if dialect.URI().DBType == schemas.ORACLE { } else if dialect.URI().DBType == schemas.ORACLE {
if statement.Start != 0 || pLimitN != nil { if statement.Start != 0 && pLimitN != nil {
oldString := buf.String() oldString := buf.String()
buf.Reset() buf.Reset()
rawColStr := columnStr rawColStr := columnStr