From 871740a95e7f2a8e6cc42e8c9eadfd912bfd7121 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 25 May 2022 19:10:38 -0500 Subject: [PATCH] fuzz fix --- src/pixie/fileformats/jpeg.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pixie/fileformats/jpeg.nim b/src/pixie/fileformats/jpeg.nim index 71c60d7..29ee736 100644 --- a/src/pixie/fileformats/jpeg.nim +++ b/src/pixie/fileformats/jpeg.nim @@ -1020,7 +1020,7 @@ proc decodeJpeg*(data: string): Image {.raises: [PixieError].} = ## Decodes the JPEG into an Image. var state = DecoderState() - state.buffer = cast[ptr UncheckedArray[uint8]](data[0].unsafeAddr) + state.buffer = cast[ptr UncheckedArray[uint8]](data.cstring) state.len = data.len while true: