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

Unified Diff: components/webcrypto/ec_import_key_spki_fuzzer.cc

Issue 1743763003: Add fuzzers for import of WebCrypto DER-encoded keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: components/webcrypto/ec_import_key_spki_fuzzer.cc
diff --git a/media/cdm/cenc_utils_fuzzertest.cc b/components/webcrypto/ec_import_key_spki_fuzzer.cc
similarity index 65%
copy from media/cdm/cenc_utils_fuzzertest.cc
copy to components/webcrypto/ec_import_key_spki_fuzzer.cc
index 8f656198d6d769c8a86585a9cd7025f9f5076714..7f16cfcacf91aa5b2922a29de23aebb45c5c6aeb 100644
--- a/media/cdm/cenc_utils_fuzzertest.cc
+++ b/components/webcrypto/ec_import_key_spki_fuzzer.cc
@@ -4,13 +4,12 @@
#include <stddef.h>
#include <stdint.h>
-#include <vector>
-#include "media/cdm/cenc_utils.h"
+#include "components/webcrypto/fuzzer_support.h"
// Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- std::vector<uint8_t> input(data, data + size);
- media::ValidatePsshInput(input);
+ webcrypto::ImportEcKeyFromDerFuzzData(data, size,
+ blink::WebCryptoKeyFormatSpki);
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698