>>> Konrad Rzeszutek Wilk 04/20/16 6:09 PM >>>
>On Mon, Apr 18, 2016 at 12:23:26AM -0600, Jan Beulich wrote:
>> >>> Konrad Rzeszutek Wilk 04/18/16 7:55 AM >>>
>> >> >+ if ( delta > elf->len )
>> >> >+ {
>> >> >+ dprintk(XENLOG_ERR, XSPLICE "%s: Section table is past end of
>> >> >payload!\n",
>>
On Mon, Apr 18, 2016 at 12:23:26AM -0600, Jan Beulich wrote:
> >>> Konrad Rzeszutek Wilk 04/18/16 7:55 AM >>>
> >> >+ if ( delta > elf->len )
> >> >+ {
> >> >+ dprintk(XENLOG_ERR, XSPLICE "%s: Section table is past end of
> >> >payload!\n",
> >> >+ elf->name);
> >> >+ return -EINVAL;
> >> >+ }
>
>>> Konrad Rzeszutek Wilk 04/18/16 7:55 AM >>>
>> >+ if ( delta > elf->len )
>> >+ {
>> >+ dprintk(XENLOG_ERR, XSPLICE "%s: Section table is past end of payload!\n",
>> >+ elf->name);
>> >+ return -EINVAL;
>> >+ }
>> >+
>> >+ for ( i = 1; i < elf->hdr->e_shnum; i++ )
>> >+ {
>> >+ delta = elf->hdr
. snip..
> >+static int elf_resolve_sections(struct xsplice_elf *elf, const void *data)
> >+{
> >+ struct xsplice_elf_sec *sec;
> >+ unsigned int i;
> >+ Elf_Off delta;
> >+ int rc;
> >+
> >+ /* xsplice_elf_load sanity checked e_shnum. */
> >+ sec = xmalloc_array(struct xsplice_elf_sec, elf->hdr->e
>>> Konrad Rzeszutek Wilk 04/14/16 12:03 AM >>>
>+static int elf_verify_strtab(const struct xsplice_elf_sec *sec)
>+{
>+ const Elf_Shdr *s;
>+ const uint8_t *contents;
Considering it's a string table, perhaps better const char *?
>+ s = sec->sec;
>+
>+ if ( s->sh_type != SHT_STRTAB )
>+ return -