Fuzz fixes (#73)

* remove old fuzz corpus and stick to using PCG for seeding fuzz test

* polish up drain logic and reduce action search space

* improve fuzzing debug prints

* more fuzz fixes also formatter capture printer fixes

* refactor StackSeeded test

* fix challenge ack infinite packet bug

* more expressive challenge satisfy

* remove printing
This commit is contained in:
Pat Whittingslow
2026-04-11 18:01:05 -03:00
committed by GitHub
parent 66a1aec593
commit 54bc52d9d8
17 changed files with 487 additions and 297 deletions
+4 -5
View File
@@ -91,15 +91,14 @@ func (stack *CapturePrinter) PrintPacket(prefix string, pkt []byte) {
}
fmtbuf = append(fmtbuf, ' ')
}
fmtbuf = append(fmtbuf, prefix...)
// Ensure minimum width of packet length display for less jitter in log viewline.
prevlen := len(prefix)
fmtbuf = strconv.AppendInt(fmtbuf, int64(len(pkt)), 10)
numLength := len(fmtbuf) - prevlen
appendSpaces := max(0, stack.namespaceminwidth-numLength) + 1 // add single space to separate actual format from packet length.
appendSpaces := max(0, stack.namespaceminwidth-len(prefix)) + 1 // add single space to separate actual format from packet length.
for range appendSpaces {
fmtbuf = append(fmtbuf, ' ')
}
fmtbuf = strconv.AppendInt(fmtbuf, int64(len(pkt)), 10)
fmtbuf = append(fmtbuf, ' ')
fmtbuf, err = stack.pfmt.FormatFrames(fmtbuf, stack.frms, pkt)
}
fmtbuf = append(fmtbuf, '\n')