diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2021-01-02 11:36:17 +0100 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2021-01-02 11:36:17 +0100 |
commit | 7620f6f39672a4dc799d3875a2c6f7a0d1f0b815 (patch) | |
tree | e93d3c9c8639020f1c24fe82dedcc2c863f06ccc /src/afl-common.c | |
parent | 214da5c42e639fb5993c9bc2ca1f48f6a8b2c9c7 (diff) | |
parent | 697e3e285bdfc3848dfeafcec7345301cb3dc64e (diff) | |
download | afl++-7620f6f39672a4dc799d3875a2c6f7a0d1f0b815.tar.gz |
Merge branch 'dev' of github.com:AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'src/afl-common.c')
-rw-r--r-- | src/afl-common.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/afl-common.c b/src/afl-common.c index 6dc8abe0..1928663d 100644 --- a/src/afl-common.c +++ b/src/afl-common.c @@ -432,7 +432,9 @@ void check_environment_vars(char **envp) { char *env, *val; while ((env = envp[index++]) != NULL) { - if (strncmp(env, "ALF_", 4) == 0) { + if (strncmp(env, "ALF_", 4) == 0 || strncmp(env, "_ALF", 4) == 0 || + strncmp(env, "__ALF", 5) == 0 || strncmp(env, "_AFL", 4) == 0 || + strncmp(env, "__AFL", 5) == 0) { WARNF("Potentially mistyped AFL environment variable: %s", env); issue_detected = 1; @@ -628,6 +630,10 @@ u8 *stringify_float(u8 *buf, size_t len, double val) { snprintf(buf, len, "%0.01f", val); + } else if (unlikely(isnan(val) || isinf(val))) { + + strcpy(buf, "inf"); + } else { stringify_int(buf, len, (u64)val); @@ -787,9 +793,9 @@ u8 *u_stringify_float(u8 *buf, double val) { sprintf(buf, "%0.01f", val); - } else if (unlikely(isnan(val) || isfinite(val))) { + } else if (unlikely(isnan(val) || isinf(val))) { - strcpy(buf, "999.9"); + strcpy(buf, "infinite"); } else { |