mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 19:38:09 +00:00
fix crash for very fast targets
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user