Bound ssl_ctx_api more aggressively. OpenSSL's d2i_X509 parser is amazingly slow. Only do about 10,000 of them, not 1,000,000. BUG=chromium:729419 Change-Id: I7034c3dde7d5c5681986af2ab5e516e54553d3c6 Reviewed-on: https://boringssl-review.googlesource.com/16905 Commit-Queue: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/fuzz/ssl_ctx_api.cc b/fuzz/ssl_ctx_api.cc index 92cffb5..316980c 100644 --- a/fuzz/ssl_ctx_api.cc +++ b/fuzz/ssl_ctx_api.cc
@@ -236,7 +236,7 @@ } extern "C" int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) { - constexpr size_t kMaxExpensiveAPIs = 1000; + constexpr size_t kMaxExpensiveAPIs = 100; unsigned expensive_api_count = 0; const std::function<void(SSL_CTX *, CBS *)> kAPIs[] = {