From f3024c3b1fbbfe442f93da3459ea79e817d5b8fe Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 26 Jun 2017 15:28:15 -0700 Subject: Split CFDE_CSSTextBuf in two. For the external buffer use case, use a CFDE_CSSExtTextBuf instead. With the split, both text buffer implementations are simpler now. As a result, it becomes obvious where it never fails. Adjust callers accordingly. Change-Id: I7b53d36593172487b8c939e6a55af2437ea4ee5a Reviewed-on: https://pdfium-review.googlesource.com/6932 Commit-Queue: Lei Zhang Reviewed-by: Henrique Nakashima --- testing/libfuzzer/pdf_css_fuzzer.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'testing/libfuzzer/pdf_css_fuzzer.cc') diff --git a/testing/libfuzzer/pdf_css_fuzzer.cc b/testing/libfuzzer/pdf_css_fuzzer.cc index 43ce686c22..d3b2e6a996 100644 --- a/testing/libfuzzer/pdf_css_fuzzer.cc +++ b/testing/libfuzzer/pdf_css_fuzzer.cc @@ -18,9 +18,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (input.GetLength() == 0) return 0; - CFDE_CSSSyntaxParser parser; - parser.Init(input.c_str(), input.GetLength()); - + CFDE_CSSSyntaxParser parser(input.c_str(), input.GetLength()); FDE_CSSSyntaxStatus status; do { status = parser.DoSyntaxParse(); -- cgit v1.2.3