about summary refs log tree commit diff
path: root/src/afl-common.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-12-23 14:58:52 +0100
committerGitHub <noreply@github.com>2020-12-23 14:58:52 +0100
commit7dc433a0c0efb236a2ab6fa4006a91aa02e26779 (patch)
treeb0a48cd22af9aaa9695b61d08499232dbe9f0f36 /src/afl-common.c
parent1078409875cacc5626a3961e08cf67c68049d22a (diff)
parent8d10d12ab344bdf6dfe0478e927c92278b4aac78 (diff)
downloadafl++-7dc433a0c0efb236a2ab6fa4006a91aa02e26779.tar.gz
Merge pull request #637 from AFLplusplus/dev
minor push to stable
Diffstat (limited to 'src/afl-common.c')
-rw-r--r--src/afl-common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/afl-common.c b/src/afl-common.c
index 4df22394..6dc8abe0 100644
--- a/src/afl-common.c
+++ b/src/afl-common.c
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <strings.h>
+#include <math.h>
 
 #include "debug.h"
 #include "alloc-inl.h"
@@ -786,6 +787,10 @@ u8 *u_stringify_float(u8 *buf, double val) {
 
     sprintf(buf, "%0.01f", val);
 
+  } else if (unlikely(isnan(val) || isfinite(val))) {
+
+    strcpy(buf, "999.9");
+
   } else {
 
     return u_stringify_int(buf, (u64)val);