Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: third_party/afl/src/test-instr.c

Issue 2075883002: Add American Fuzzy Lop (afl) to third_party/afl/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/afl/src/qemu_mode/patches/translate-all.diff ('k') | third_party/afl/src/types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/afl/src/test-instr.c
diff --git a/third_party/afl/src/test-instr.c b/third_party/afl/src/test-instr.c
new file mode 100644
index 0000000000000000000000000000000000000000..09a1c9f700f26c8d1a15a92b7531287825275811
--- /dev/null
+++ b/third_party/afl/src/test-instr.c
@@ -0,0 +1,37 @@
+/*
+ american fuzzy lop - a trivial program to test the build
+ --------------------------------------------------------
+
+ Written and maintained by Michal Zalewski <lcamtuf@google.com>
+
+ Copyright 2014 Google Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at:
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int main(int argc, char** argv) {
+
+ char buf[8];
+
+ if (read(0, buf, 8) < 1) {
+ printf("Hum?\n");
+ exit(1);
+ }
+
+ if (buf[0] == '0')
+ printf("Looks like a zero to me!\n");
+ else
+ printf("A non-zero value? How quaint!\n");
+
+ exit(0);
+
+}
« no previous file with comments | « third_party/afl/src/qemu_mode/patches/translate-all.diff ('k') | third_party/afl/src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698