prepare process: add magic header in program_load_desc
Check we mapped the correct region with a magic header in the struct Original commit: d246b93a3bced92d0ac2a4a337118091b010658a Fujitsu: POSTK_DEBUG_TEMP_FIX_76 Change-Id: If848be64af5d76844ba65b48493021637c8114f4
This commit is contained in:
@ -276,6 +276,7 @@ struct program_load_desc *load_elf(FILE *fp, char **interp_pathp)
|
||||
+ sizeof(struct program_image_section) * nhdrs);
|
||||
memset(desc, '\0', sizeof(struct program_load_desc)
|
||||
+ sizeof(struct program_image_section) * nhdrs);
|
||||
desc->magic = PLD_MAGIC;
|
||||
fseek(fp, hdr.e_phoff, SEEK_SET);
|
||||
j = 0;
|
||||
desc->num_sections = nhdrs;
|
||||
|
||||
Reference in New Issue
Block a user