aboutsummaryrefslogtreecommitdiff
path: root/test/test-floatingpoint.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-07-14 23:26:11 +0200
committervan Hauser <vh@thc.org>2020-07-14 23:26:11 +0200
commit383b280531a92a8b81d112a9acb4e44c08987be0 (patch)
tree1d23c9fb0762e62db06a5a3f856387f255f700b5 /test/test-floatingpoint.c
parent95276f7da6ed9dd72556236f505a8997bee23387 (diff)
downloadAFLplusplus-383b280531a92a8b81d112a9acb4e44c08987be0.tar.gz
added frida gum extension
Diffstat (limited to 'test/test-floatingpoint.c')
-rw-r--r--test/test-floatingpoint.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/test-floatingpoint.c b/test/test-floatingpoint.c
index f78b5d9f..76cdccf0 100644
--- a/test/test-floatingpoint.c
+++ b/test/test-floatingpoint.c
@@ -1,18 +1,20 @@
#include <stdlib.h>
#include <unistd.h>
-int main(void)
-{
- long double magic;
+int main(void) {
- ssize_t bytes_read = read(STDIN_FILENO, &magic, sizeof(magic));
- if (bytes_read < (ssize_t)sizeof(magic)) {
- return 1;
- }
+ long double magic;
- if( (-magic == 15.0 + 0.5 + 0.125 + 0.03125 + 0.0078125) ){ /* 15 + 1/2 + 1/8 + 1/32 + 1/128 */
- abort();
- }
+ ssize_t bytes_read = read(STDIN_FILENO, &magic, sizeof(magic));
+ if (bytes_read < (ssize_t)sizeof(magic)) { return 1; }
+
+ if ((-magic == 15.0 + 0.5 + 0.125 + 0.03125 +
+ 0.0078125)) { /* 15 + 1/2 + 1/8 + 1/32 + 1/128 */
+ abort();
+
+ }
+
+ return 0;
- return 0;
}
+