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

Unified Diff: testing/libfuzzer/fuzzers/nss/asn1_generalizedtime_fuzzer.cc

Issue 1677803002: Add a bunch of NSS ASN.1 fuzzers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leak Created 4 years, 10 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
Index: testing/libfuzzer/fuzzers/nss/asn1_generalizedtime_fuzzer.cc
diff --git a/components/webcrypto/ec_import_key_pkcs8_fuzzer.cc b/testing/libfuzzer/fuzzers/nss/asn1_generalizedtime_fuzzer.cc
similarity index 53%
copy from components/webcrypto/ec_import_key_pkcs8_fuzzer.cc
copy to testing/libfuzzer/fuzzers/nss/asn1_generalizedtime_fuzzer.cc
index 154004cb22e4a093525a2dc74d497ad33499ce6b..a74e3ac1f9d24e94a73e8c845e764de82ffa7531 100644
--- a/components/webcrypto/ec_import_key_pkcs8_fuzzer.cc
+++ b/testing/libfuzzer/fuzzers/nss/asn1_generalizedtime_fuzzer.cc
@@ -5,11 +5,14 @@
#include <stddef.h>
#include <stdint.h>
-#include "components/webcrypto/fuzzer_support.h"
+#include "testing/libfuzzer/fuzzers/nss/asn1_fuzzer_template.h"
// Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- webcrypto::ImportEcKeyFromDerFuzzData(data, size,
- blink::WebCryptoKeyFormatPkcs8);
+ NSSFuzzOneInput<SECItem, SEC_QuickDERDecodeItem>(
+ SEC_ASN1_GET(SEC_GeneralizedTimeTemplate), data, size);
+ NSSFuzzOneInput<SECItem, SEC_ASN1DecodeItem>(
+ SEC_ASN1_GET(SEC_GeneralizedTimeTemplate), data, size);
+
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698