aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuzzer/asn1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fuzzer/asn1.cpp')
-rw-r--r--src/fuzzer/asn1.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/fuzzer/asn1.cpp b/src/fuzzer/asn1.cpp
new file mode 100644
index 000000000..b0ea553e5
--- /dev/null
+++ b/src/fuzzer/asn1.cpp
@@ -0,0 +1,24 @@
+/*
+* (C) 2016,2017 Jack Lloyd
+*
+* Botan is released under the Simplified BSD License (see license.txt)
+*/
+
+#include "fuzzers.h"
+#include <botan/ber_dec.h>
+
+void fuzz(const uint8_t in[], size_t len)
+ {
+ try
+ {
+ Botan::DataSource_Memory input(in, len);
+ Botan::BER_Decoder dec(input);
+
+ while(dec.more_items())
+ {
+ Botan::BER_Object obj;
+ dec.get_next(obj);
+ }
+ }
+ catch(Botan::Exception& e) { }
+ }