mirror of https://github.com/thesofproject/sof.git
smex: elf: find_section: check section ptr
Validate section ptr Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
This commit is contained in:
parent
7501b2e094
commit
c0092bbf7a
|
@ -387,6 +387,11 @@ int elf_find_section(const struct elf_module *module, const char *name)
|
||||||
size_t count;
|
size_t count;
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
|
if (module->section == NULL) {
|
||||||
|
fprintf(stderr, "error: NULL module section\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
section = &module->section[hdr->shstrndx];
|
section = &module->section[hdr->shstrndx];
|
||||||
|
|
||||||
/* alloc data data */
|
/* alloc data data */
|
||||||
|
|
Loading…
Reference in New Issue