Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Courgette] Restrict PE rel32 scan size to min(virtual_size, size_of_…
…raw_data). For PE files, rel32 scanning previously scans .text data spanning |size_of_raw_data| bytes. However, it's possible for |virtual_size| < |size_of_raw_data|. In this case, any rel32 references found in the data beyond |virtual_size| would have an invalid RVA, causing failure when attempting to translate them to file offsets. This CL fixes the issue by reducing range of rel32 scan size to |min(virtual_size, size_of_raw_data)|, thereby avoiding extracting these invalid rel32 references. Bug: 935283 Change-Id: I81d827d904eb6d168b5268c961419c1855382f69 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1535435 Commit-Queue: Samuel Huang <huangs@chromium.org> Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Reviewed-by: Samuel Huang <huangs@chromium.org> Cr-Commit-Position: refs/heads/master@{#643525}
- Loading branch information