diff options
author | mattn <mattn.jp@gmail.com> | 2014-08-18 18:23:58 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2014-08-18 18:23:58 +0900 |
commit | d069822191ca6ec71a5a678552a937e27173b393 (patch) | |
tree | 20a78586dfdcebf2ec4542bc1fc8b1a4721fa781 /sqlite3.go | |
parent | Add TestStress (diff) | |
download | golite-d069822191ca6ec71a5a678552a937e27173b393.tar.gz golite-d069822191ca6ec71a5a678552a937e27173b393.tar.xz |
Check parameter count
Diffstat (limited to 'sqlite3.go')
-rw-r--r-- | sqlite3.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -159,6 +159,9 @@ func (c *SQLiteConn) Exec(query string, args []driver.Value) (driver.Result, err var res driver.Result if s.(*SQLiteStmt).s != nil { na := s.NumInput() + if na < len(args) { + return nil, errors.New("args is not enough to execute query") + } res, err = s.Exec(args[:na]) if err != nil && err != driver.ErrSkip { s.Close() |