if (abfd->my_archive == NULL || bfd_is_thin_archive (abfd->my_archive))
{
- if (!bfd_xcoff_split_import_path (abfd, abfd->filename,
+ if (!bfd_xcoff_split_import_path (abfd, bfd_get_filename (abfd),
&n->path, &n->file))
return FALSE;
n->member = "";
if (!archive_info->impfile)
{
if (!bfd_xcoff_split_import_path (archive_info->archive,
- archive_info->archive->filename,
+ bfd_get_filename (archive_info
+ ->archive),
&archive_info->imppath,
&archive_info->impfile))
return FALSE;
{
bfd_byte *linenos;
- amt = linesz * o->lineno_count;
- linenos = bfd_malloc (amt);
+ if (bfd_seek (abfd, o->line_filepos, SEEK_SET) != 0)
+ goto error_return;
+ if (_bfd_mul_overflow (linesz, o->lineno_count, &amt))
+ {
+ bfd_set_error (bfd_error_file_too_big);
+ goto error_return;
+ }
+ linenos = _bfd_malloc_and_read (abfd, amt, amt);
if (linenos == NULL)
goto error_return;
reloc_info[o->target_index].linenos = linenos;
- if (bfd_seek (abfd, o->line_filepos, SEEK_SET) != 0
- || bfd_bread (linenos, amt, abfd) != amt)
- goto error_return;
}
}