Commit d1b39b94 authored by Rachel Blum's avatar Rachel Blum Committed by Commit Bot

[Hunspell] Add fuzzer for BDict::Verify

BUG=796935

Change-Id: Ib1ca8a5af6e57b3f8173d64383b33b636eaa613b
Reviewed-on: https://chromium-review.googlesource.com/905798Reviewed-by: default avatarAbhishek Arya <inferno@chromium.org>
Commit-Queue: Rachel Blum <groby@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534892}
parent eeca1d8f
......@@ -122,3 +122,14 @@ fuzzer_test("hunspell_fuzzer") {
# This is a dictionary for the fuzzer, not a spellcheck dictionary.
dict = "fuzz/hunspell.dict"
}
fuzzer_test("bdict_fuzzer") {
sources = [
"fuzz/bdict_fuzzer.cc",
]
deps = [
":hunspell",
"//base:base",
]
seed_corpus = "fuzz/bdict_corpus"
}
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stddef.h>
#include <stdint.h>
#include "third_party/hunspell/google/bdict.h"
// Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
hunspell::BDict::Verify(reinterpret_cast<const char*>(data), size);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment