Skip to content

Commit

Permalink
Updated variable names and added build comment
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamKorcz committed Nov 30, 2020
1 parent 309e575 commit 0d9368c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions fuzz.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build gofuzz

package redis

import (
Expand All @@ -22,13 +24,13 @@ func init() {
}

func Fuzz(data []byte) int {
array_len := len(data)
if array_len < 4 {
arrayLen := len(data)
if arrayLen < 4 {
return -1
}
max_iter := int(uint(data[0]))
for i := 0; i < max_iter && i < array_len; i++ {
n := i % array_len
maxIter := int(uint(data[0]))
for i := 0; i < maxIter && i < arrayLen; i++ {
n := i % arrayLen
if n == 0 {
_ = rdb.Set(ctx, string(data[i:]), string(data[i:]), 0).Err()
} else if n == 1 {
Expand Down

0 comments on commit 0d9368c

Please sign in to comment.