Refactor base::FuzzedDataProvider and fix the calling sites. The main goals:

1) Avoid using std::string as a container for non-string data. The problem
   is that the underlying std::string buffer is bigger than the data we put
   inside (at least by 1 byte (null terminator), and might be even bigger).
   This may hide buffer overflow errors from ASan.

2) Make FuzzedDataProvider portable (remove //base dependency).

3) Make the types it returns more explicit (e.g. `int32_t` instead of `int`).

Bug: 907103, 906080
Change-Id: Ibe1cd5ef6cb72140459a8ba3ac301f8c2bef48b9
Reviewed-on: https://chromium-review.googlesource.com/c/1344993
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Reviewed-by: Cait Phillips <caitkp@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Oliver Chang <ochang@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#610236}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c416f80a900acf43478a6ad469ed0fa4af2e35aa
1 file changed
tree: 5605599dbb373b8364e1923d2429b5929127040a
  1. BUILD.gn
  2. compact_enc_det_fuzzer.cc
  3. DEPS
  4. LICENSE
  5. OWNERS
  6. README.chromium