sanitizers

package module
v0.0.0-...-8c53acf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

README

Golang Sanitizers

This module contains the implementation of the hooks added by gofuzz to the code under test. It must be added as a dependency to the application under test in order to build it with the bug detection capabilities available in this module.

go get github.com/CodeIntelligenceTesting/gofuzz/sanitizers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdCombinedOutput

func CmdCombinedOutput(hookId int, cmd *exec.Cmd) ([]byte, error)

func CmdOutput

func CmdOutput(hookId int, cmd *exec.Cmd) ([]byte, error)

func CmdRun

func CmdRun(hookId int, cmd *exec.Cmd) error

func CmdStart

func CmdStart(hookId int, cmd *exec.Cmd) error

func ConnExecContext

func ConnExecContext(hookId int, conn *sql.Conn, ctx context.Context, query string, args ...any) (sql.Result, error)

func ConnPrepareContext

func ConnPrepareContext(hookId int, conn *sql.Conn, ctx context.Context, query string) (*sql.Stmt, error)

func ConnQueryContext

func ConnQueryContext(hookId int, conn *sql.Conn, ctx context.Context, query string, args ...any) (*sql.Rows, error)

func ConnQueryRowContext

func ConnQueryRowContext(hookId int, conn *sql.Conn, ctx context.Context, query string, args ...any) *sql.Row

func DbExec

func DbExec(hookId int, db *sql.DB, query string, args ...any) (sql.Result, error)

func DbExecContext

func DbExecContext(hookId int, db *sql.DB, ctx context.Context, query string, args ...any) (sql.Result, error)

func DbPrepare

func DbPrepare(hookId int, db *sql.DB, query string) (*sql.Stmt, error)

func DbPrepareContext

func DbPrepareContext(hookId int, db *sql.DB, ctx context.Context, query string) (*sql.Stmt, error)

func DbQuery

func DbQuery(hookId int, db *sql.DB, query string, args ...any) (*sql.Rows, error)

func DbQueryContext

func DbQueryContext(hookId int, db *sql.DB, ctx context.Context, query string, args ...any) (*sql.Rows, error)

func DbQueryRow

func DbQueryRow(hookId int, db *sql.DB, query string, args ...any) *sql.Row

func DbQueryRowContext

func DbQueryRowContext(hookId int, db *sql.DB, ctx context.Context, query string, args ...any) *sql.Row

func FilepathWalk

func FilepathWalk(hookId int, root string, fn filepath.WalkFunc) error

func FilepathWalkDir

func FilepathWalkDir(hookId int, root string, fn fs.WalkDirFunc) error

func FsFileInfoToDirEntry

func FsFileInfoToDirEntry(hookId int, info fs.FileInfo) fs.DirEntry

func FsOpen

func FsOpen(hookId int, fsys fs.FS, name string) (fs.File, error)

func FsReadDir

func FsReadDir(hookId int, fsys fs.FS, name string) ([]fs.DirEntry, error)

func FsReadFile

func FsReadFile(hookId int, fsys fs.FS, name string) ([]byte, error)

func FsStat

func FsStat(hookId int, fsys fs.FS, name string) (fs.FileInfo, error)

func FsSub

func FsSub(hookId int, fsys fs.FS, dir string) (fs.FS, error)

func FsWalkDir

func FsWalkDir(hookId int, fsys fs.FS, root string, fn fs.WalkDirFunc) error

func HtmlTemplateExecute

func HtmlTemplateExecute(hookId int, tmpl *htmlTemplate.Template, wr io.Writer, data any) error

func HtmlTemplateExecuteTemplate

func HtmlTemplateExecuteTemplate(hookId int, tmpl *htmlTemplate.Template, wr io.Writer, name string, data any) error

func IoutilReadDir

func IoutilReadDir(hookId int, dirname string) ([]fs.FileInfo, error)

func IoutilReadFile

func IoutilReadFile(hookId int, filename string) ([]byte, error)

func IoutilTempDir

func IoutilTempDir(hookId int, dir, pattern string) (string, error)

func IoutilTempFile

func IoutilTempFile(hookId int, dir, pattern string) (*os.File, error)

func IoutilWriteFile

func IoutilWriteFile(hookId int, filename string, data []byte, perm fs.FileMode) error

func OsChdir

func OsChdir(hookId int, dir string) error

func OsChmod

func OsChmod(hookId int, name string, mode os.FileMode) error

func OsChown

func OsChown(hookId int, name string, uid, gid int) error

func OsChtimes

func OsChtimes(hookId int, name string, atime time.Time, mtime time.Time) error

func OsCreate

func OsCreate(hookId int, name string) (*os.File, error)

func OsCreateTemp

func OsCreateTemp(hookId int, dir, pattern string) (*os.File, error)

func OsDirFS

func OsDirFS(hookId int, dir string) fs.FS

func OsLchown

func OsLchown(hookId int, name string, uid, gid int) error
func OsLink(hookId int, oldname, newname string) error

func OsLstat

func OsLstat(hookId int, name string) (os.FileInfo, error)

func OsMkdir

func OsMkdir(hookId int, name string, perm os.FileMode) error

func OsMkdirAll

func OsMkdirAll(hookId int, name string, perm os.FileMode) error

func OsMkdirTemp

func OsMkdirTemp(hookId int, dir, pattern string) (string, error)

func OsNewFile

func OsNewFile(hookId int, fd uintptr, name string) *os.File

func OsOpen

func OsOpen(hookId int, name string) (*os.File, error)

func OsOpenFile

func OsOpenFile(hookId int, name string, flag int, perm os.FileMode) (*os.File, error)

func OsReadDir

func OsReadDir(hookId int, name string) ([]os.DirEntry, error)

func OsReadFile

func OsReadFile(hookId int, name string) ([]byte, error)
func OsReadlink(hookId int, name string) (string, error)

func OsRemove

func OsRemove(hookId int, name string) error

func OsRemoveAll

func OsRemoveAll(hookId int, path string) error

func OsRename

func OsRename(hookId int, oldpath, newpath string) error

func OsStartProcess

func OsStartProcess(hookId int, name string, argv []string, attr *os.ProcAttr) (*os.Process, error)

func OsStat

func OsStat(hookId int, name string) (os.FileInfo, error)
func OsSymlink(hookId int, oldname, newname string) error

func OsTruncate

func OsTruncate(hookId int, name string, size int64) error

func OsWriteFile

func OsWriteFile(hookId int, name string, data []byte, perm os.FileMode) error

func StmtExec

func StmtExec(_ int, stmt *sql.Stmt, args ...any) (sql.Result, error)

func StmtExecContext

func StmtExecContext(_ int, stmt *sql.Stmt, ctx context.Context, args ...any) (sql.Result, error)

func StmtQuery

func StmtQuery(_ int, stmt *sql.Stmt, args ...any) (*sql.Rows, error)

func StmtQueryContext

func StmtQueryContext(_ int, stmt *sql.Stmt, ctx context.Context, args ...any) (*sql.Rows, error)

func StmtQueryRow

func StmtQueryRow(_ int, stmt *sql.Stmt, args ...any) *sql.Row

func StmtQueryRowContext

func StmtQueryRowContext(_ int, stmt *sql.Stmt, ctx context.Context, args ...any) *sql.Row

func TextTemplateExecute

func TextTemplateExecute(hookId int, tmpl *textTemplate.Template, wr io.Writer, data any) error

func TextTemplateExecuteTemplate

func TextTemplateExecuteTemplate(hookId int, tmpl *textTemplate.Template, wr io.Writer, name string, data any) error

func TxExec

func TxExec(hookId int, tx *sql.Tx, query string, args ...any) (sql.Result, error)

func TxExecContext

func TxExecContext(hookId int, tx *sql.Tx, ctx context.Context, query string, args ...any) (sql.Result, error)

func TxPrepare

func TxPrepare(hookId int, tx *sql.Tx, query string) (*sql.Stmt, error)

func TxPrepareContext

func TxPrepareContext(hookId int, tx *sql.Tx, ctx context.Context, query string) (*sql.Stmt, error)

func TxQuery

func TxQuery(hookId int, tx *sql.Tx, query string, args ...any) (*sql.Rows, error)

func TxQueryContext

func TxQueryContext(hookId int, tx *sql.Tx, ctx context.Context, query string, args ...any) (*sql.Rows, error)

func TxQueryRow

func TxQueryRow(hookId int, tx *sql.Tx, query string, args ...any) *sql.Row

func TxQueryRowContext

func TxQueryRowContext(hookId int, tx *sql.Tx, ctx context.Context, query string, args ...any) *sql.Row

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL