From a90b1c1bcb14ec390886ef47eab8714e34c71c15 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Fri, 19 Jun 2020 11:43:04 +0200 Subject: [PATCH] fuzz: disable DNP3 checksums while fuzzing --- src/app-layer-dnp3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app-layer-dnp3.c b/src/app-layer-dnp3.c index d0c3f4f336..be682bb019 100644 --- a/src/app-layer-dnp3.c +++ b/src/app-layer-dnp3.c @@ -175,6 +175,9 @@ static uint16_t DNP3ComputeCRC(const uint8_t *buf, uint32_t len) */ static int DNP3CheckCRC(const uint8_t *block, uint32_t len) { +#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION + return 1; +#endif uint32_t crc_offset; uint16_t crc;