>>> On 05.11.15 at 12:51, <ross.lagerw...@citrix.com> wrote: > On 11/05/2015 10:35 AM, Jan Beulich wrote: >>>>> On 04.11.15 at 23:21, <konrad.w...@oracle.com> wrote: >>>> +int xsplice_perform_rela(struct xsplice_elf *elf, >>>> + struct xsplice_elf_sec *base, >>>> + struct xsplice_elf_sec *rela) >>>> +{ >>>> + Elf64_Rela *r; >>>> + int symndx, i; >>> >>> unsigned int >>> >>>> + uint64_t val; >>>> + uint8_t *dest; >>>> + >>> >>> Can you double check that rela->sec-sh_entsize is not zero first? >> >> Perhaps not just not zero, but at least a certain minimum? Or even >> equaling some sizeof()? >> > > Well it only makes sense if rela->sec-sh_entsize == sizeof(Elf64_Rela) > so that is what I shall check for.
The question whether to use == or >= really depends on whether we expect (theoretical) additions to the structure to be backwards compatible. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel