• Maks Orlovich's avatar
    disk_cache/blockfile: Fix issues involving trailing nulls for keys · 07aac5ad
    Maks Orlovich authored
    The code for reading entries' keys has trusted that the supposed-to-be
    on-disk nul termination was there, which is a mistake since sometimes
    files get corrupted  ...And also because in some cases we've failed to
    write it out. So fix both.
    
    This has mostly stopped being an active issue since May when our
    Windows build has switched to libc++, as that fixes up nuls on
    std::string copy (Microsoft's version doesn't), but it seems
    worth fixing regardless for other embedders and good hygiene.
    
    Bug: 973943
    Change-Id: I86c6e44471447671004efd37aeecd760b3972183
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1718844Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
    Commit-Queue: Maks Orlovich <morlovich@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#681483}
    07aac5ad
entry_impl.cc 49.3 KB