Fix crash when trying to load invalid ELF file.
Bug: http://b/22047255
Bug: http://b/22091640
Change-Id: I6c51cff43287a6ac4b25fa9ce6a6fc3d232fd047
(cherry picked from commit 06700b2b5e
)
This commit is contained in:
@@ -1337,7 +1337,7 @@ static soinfo* load_library(int fd, off64_t file_offset,
|
||||
}
|
||||
|
||||
// Read the ELF header and load the segments.
|
||||
ElfReader elf_reader(realpath.c_str(), fd, file_offset);
|
||||
ElfReader elf_reader(realpath.c_str(), fd, file_offset, file_stat.st_size);
|
||||
if (!elf_reader.Load(extinfo)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user