Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

fuzz.go 533B

123456789101112131415161718192021222324
  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. // +build gofuzz
  9. package mysql
  10. import (
  11. "database/sql"
  12. )
  13. func Fuzz(data []byte) int {
  14. db, err := sql.Open("mysql", string(data))
  15. if err != nil {
  16. return 0
  17. }
  18. db.Close()
  19. return 1
  20. }