nimPNG/tests/fuzz_codec.nim

10 lines
228 B
Nim
Raw Permalink Normal View History

2020-05-28 14:10:44 +00:00
import testutils/fuzzing, ../nimPNG
proc toString(x: openArray[byte]): string =
result = newString(x.len)
if x.len != 0:
copyMem(result[0].addr, x[0].unsafeAddr, x.len)
test:
let png = decodePNG32(toString(payload))