• Daniel Rubery's avatar
    Fix crash when analyzing multipart RAR downloads · 66d563b8
    Daniel Rubery authored
    On Windows, when downloading the second or later part of a multipart
    archive, unrar will attempt to open another file. Due to the
    modifications we place on unrar to work within the sandbox, we
    don't open the file, but instead use File::hOpenFile as the handle.
    This is uninitialized memory, which is passed to GetFileType, causing
    a crash.
    
    This CL initializes hOpenFile to fix this problem and adds a test that
    would have caught the issue.
    
    Fixed: 1135503
    Change-Id: I6cc83a5a2b5925900cde7b8b2dc8be64f0620d21
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490334
    Commit-Queue: Varun Khaneja <vakh@chromium.org>
    Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#820896}
    66d563b8
file.cpp 18 KB