View | Details | Raw Unified | Return to bug 21786
Collapse All | Expand All

(-)a/bfd/coff-rs6000.c (-4 / +5 lines)
Lines 1276-1282 _bfd_xcoff_slurp_armap (bfd *abfd) Link Here
1276
1276
1277
      /* The symbol table starts with a normal archive header.  */
1277
      /* The symbol table starts with a normal archive header.  */
1278
      if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
1278
      if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
1279
	  != SIZEOF_AR_HDR_BIG)
1279
	  != SIZEOF_AR_HDR_BIG || hdr.namlen[3] != '\0')
1280
	return FALSE;
1280
	return FALSE;
1281
1281
1282
      /* Skip the name (normally empty).  */
1282
      /* Skip the name (normally empty).  */
Lines 1386-1392 _bfd_xcoff_archive_p (bfd *abfd) Link Here
1386
1386
1387
      /* Now read the rest of the file header.  */
1387
      /* Now read the rest of the file header.  */
1388
      amt = SIZEOF_AR_FILE_HDR - SXCOFFARMAG;
1388
      amt = SIZEOF_AR_FILE_HDR - SXCOFFARMAG;
1389
      if (bfd_bread (&hdr.memoff, amt, abfd) != amt)
1389
      if (bfd_bread (&hdr.memoff, amt, abfd) != amt
1390
          || hdr.firstmemoff[XCOFFARMAG_ELEMENT_SIZE-1])
1390
	{
1391
	{
1391
	  if (bfd_get_error () != bfd_error_system_call)
1392
	  if (bfd_get_error () != bfd_error_system_call)
1392
	    bfd_set_error (bfd_error_wrong_format);
1393
	    bfd_set_error (bfd_error_wrong_format);
Lines 1463-1469 _bfd_xcoff_read_ar_hdr (bfd *abfd) Link Here
1463
      struct xcoff_ar_hdr *hdrp;
1464
      struct xcoff_ar_hdr *hdrp;
1464
1465
1465
      if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
1466
      if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
1466
	  != SIZEOF_AR_HDR)
1467
	  != SIZEOF_AR_HDR || hdr.namlen[3] != '\0')
1467
	{
1468
	{
1468
	  free (ret);
1469
	  free (ret);
1469
	  return NULL;
1470
	  return NULL;
Lines 1495-1501 _bfd_xcoff_read_ar_hdr (bfd *abfd) Link Here
1495
      struct xcoff_ar_hdr_big *hdrp;
1496
      struct xcoff_ar_hdr_big *hdrp;
1496
1497
1497
      if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
1498
      if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
1498
	  != SIZEOF_AR_HDR_BIG)
1499
	  != SIZEOF_AR_HDR_BIG || hdr.namlen[3] != '\0')
1499
	{
1500
	{
1500
	  free (ret);
1501
	  free (ret);
1501
	  return NULL;
1502
	  return NULL;
(-)a/bfd/coff64-rs6000.c (-1 / +1 lines)
Lines 1888-1894 xcoff64_slurp_armap (bfd *abfd) Link Here
1888
1888
1889
  /* The symbol table starts with a normal archive header.  */
1889
  /* The symbol table starts with a normal archive header.  */
1890
  if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
1890
  if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
1891
      != SIZEOF_AR_HDR_BIG)
1891
      != SIZEOF_AR_HDR_BIG || hdr.namlen[3] != '\0')
1892
    return FALSE;
1892
    return FALSE;
1893
1893
1894
  /* Skip the name (normally empty).  */
1894
  /* Skip the name (normally empty).  */

Return to bug 21786