Skip to content

Commit

Permalink
Define fuzzing target
Browse files Browse the repository at this point in the history
  • Loading branch information
bookmoons committed Aug 24, 2019
1 parent 8176581 commit bfa72c5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions fuzz.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// +build gofuzz

package xlsx

// Fuzz tests parsing and cell processing
func Fuzz(fuzz []byte) int {
file, err := OpenBinary(fuzz)
if err != nil {
return 0
}
for _, sheet := range file.Sheets {
for _, row := range sheet.Rows {
for _, cell := range row.Cells {
cell.String()
}
}
}
return 1
}

0 comments on commit bfa72c5

Please sign in to comment.