e_entry can be smaller than a pointer. Cast it to an intptr_t before

casting it to a uint64_t *.
This commit is contained in:
imp 2017-12-03 04:55:04 +00:00
parent 26911ce567
commit 45d6ac72c6

View File

@ -82,7 +82,7 @@ ppc64_ofw_elf_exec(struct preloaded_file *fp)
if ((e->e_flags & 3) == 2)
entry = e->e_entry;
else
entry = *(uint64_t *)e->e_entry;
entry = *(uint64_t *)(intptr_t)e->e_entry;
if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0)
return (error);