]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#640,!351] Don't log EOF received from AFL
authorStephen Morris <stephen@isc.org>
Tue, 25 Jun 2019 16:18:25 +0000 (17:18 +0100)
committerStephen Morris <stephen@isc.org>
Tue, 1 Oct 2019 16:00:21 +0000 (17:00 +0100)
There seemed to be a lot of them and they were just filling up the log.

src/lib/dhcpsrv/fuzz.cc

index 592d5b720ce143b7816e54f562a7a616cc637aeb..11afbe1b685ce1d27fd61ff2a63e5dd71be27698 100644 (file)
@@ -241,7 +241,10 @@ Fuzz::run(void) {
         char buf[BUFFER_SIZE];
         ssize_t length = read(0, buf, sizeof(buf));
         if (length <= 0) {
-            LOG_ERROR(fuzz_logger, FUZZ_READ_FAIL).arg(strerror(errno));
+            // Don't log EOFs received - they may be generated by AFL
+            if (length != 0) {
+                LOG_ERROR(fuzz_logger, FUZZ_READ_FAIL).arg(strerror(errno));
+            }
             usleep(SLEEP_INTERVAL);
             continue;
         }