We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f51e4e commit 128a673Copy full SHA for 128a673
fuzz.go
@@ -0,0 +1,24 @@
1
+// Go MySQL Driver - A MySQL-Driver for Go's database/sql package.
2
+//
3
+// Copyright 2020 The Go-MySQL-Driver Authors. All rights reserved.
4
5
+// This Source Code Form is subject to the terms of the Mozilla Public
6
+// License, v. 2.0. If a copy of the MPL was not distributed with this file,
7
+// You can obtain one at http://mozilla.org/MPL/2.0/.
8
+
9
+// +build gofuzz
10
11
+package mysql
12
13
+import (
14
+ "database/sql"
15
+)
16
17
+func Fuzz(data []byte) int {
18
+ db, err := sql.Open("mysql", string(data))
19
+ if err != nil {
20
+ return 0
21
+ }
22
+ db.Close()
23
+ return 1
24
+}
0 commit comments