off = bfd_getl16 (sbm->next);
if (off != 0)
{
+ /* Read the 'next' array. */
sbmdesc->next = (unsigned short *)bfd_alloc
(abfd, sbm_len * sizeof (unsigned short));
buf1 = data + off;
}
else
{
+ /* There is no next array if there is only one submap. */
BFD_ASSERT (tdata->nbr_dcxsbm == 1);
sbmdesc->next = NULL;
}
/* Check id. */
if (mhd->id != MHD__C_MHDID)
return FALSE;
- if (len >= sizeof (struct vms_mhd))
+ if (len >= MHD__C_MHDLEN + 1)
el->selective_search = (mhd->objstat & MHD__M_SELSRC) ? 1 : 0;
el->mtime = vms_rawtime_to_time_t (mhd->datim);
el->mtime_set = TRUE;