aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 5191a62..94ebce3 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -1,3 +1,8 @@
+// Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
+//
+// Use of this source code is governed by an MIT-style
+// license that can be found in the LICENSE file.
+
package sqlite3
/*
@@ -162,6 +167,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 len(args) < na {
+ 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()