Skip to content

Commit c5e14ea

Browse files
committed
fix a couple bugs
1 parent c507016 commit c5e14ea

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

run.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,20 @@ def start_reporting_process(reader)
2525
loop do
2626
encoded_bytes, cov_hash = reader.gets.strip.split('_')
2727

28-
if !seen.include?(cov_hash)
29-
seen[cov_hash] = Base64.strict_decode64(encoded_bytes)
30-
puts(seen)
28+
if seen.include?(cov_hash)
29+
next
3130
end
31+
32+
seen[cov_hash] = Base64.strict_decode64(encoded_bytes)
33+
puts(seen)
3234
end
3335
end
3436
end
3537

36-
def start_fuzzing_process(writer)
38+
def start_fuzzing_process(file_path, writer)
3739
fork do
3840
STDOUT.reopen('/dev/null')
3941
STDIN.reopen('/dev/null')
40-
4142
Coverage.start(:all)
4243

4344
bytes = Random.new.bytes(10)
@@ -72,7 +73,7 @@ def run
7273
start_reporting_process(reader)
7374

7475
loop do
75-
start_fuzzing_process
76+
start_fuzzing_process(file_path, writer)
7677
Process.wait
7778
end
7879
end

0 commit comments

Comments
 (0)