mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
kernel_loader: fix ELF Phdr p_type comparison
The program header p_type field is an enumerated value, not a bitfield. BUG=None TEST=Boot a kernel Change-Id: I5327cc8de9d8401a74c86fd4f3deab9f390c0924 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1412835 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
parent
92f73d73d0
commit
1c9e1cce16
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ where
|
|||
|
||||
// Read in each section pointed to by the program headers.
|
||||
for phdr in &phdrs {
|
||||
if (phdr.p_type & elf::PT_LOAD) == 0 || phdr.p_filesz == 0 {
|
||||
if phdr.p_type != elf::PT_LOAD || phdr.p_filesz == 0 {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue