• Matt Menke's avatar
    Fix CHECK in net_mime_type_fuzzer. · 9bdf9c2e
    Matt Menke authored
    When diving up the input into 4 chunks, it was skipping over the final
    character of each chunk. This happened even if a chunk included all
    remaining characters, resulting in a StringPiece that started
    beyond the end of the string. This resulted in a 0-length StringPiece,
    and things worked fine for years, until a CHECK was added catching this
    this brokenness.
    
    This CL switches the fuzzer over to using FuzzedDataProvider, which
    doesn't have this issue.
    
    Fixed: 1123036
    Change-Id: If17e26d065a157f8d401a7e4afc06c769c8670f8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382063Reviewed-by: default avatarEric Roman <eroman@chromium.org>
    Commit-Queue: Matt Menke <mmenke@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#802788}
    9bdf9c2e
mime_sniffer_fuzzer.cc 2.14 KB