rpms/binutils/devel binutils-2.19.51.0.10-build-id.patch, 1.1, 1.2 binutils.spec, 1.167, 1.168

Nicholas Clifton nickc at fedoraproject.org
Tue Jul 14 09:48:33 UTC 2009


Author: nickc

Update of /cvs/pkgs/rpms/binutils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11489

Modified Files:
	binutils-2.19.51.0.10-build-id.patch binutils.spec 
Log Message:
Fix build-id patch to avoid memory corruption.  (BZ 501582)


binutils-2.19.51.0.10-build-id.patch:

Index: binutils-2.19.51.0.10-build-id.patch
===================================================================
RCS file: /cvs/pkgs/rpms/binutils/devel/binutils-2.19.51.0.10-build-id.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- binutils-2.19.51.0.10-build-id.patch	22 Jun 2009 16:18:17 -0000	1.1
+++ binutils-2.19.51.0.10-build-id.patch	14 Jul 2009 09:48:32 -0000	1.2
@@ -1,7 +1,7 @@
-diff -rup ../binutils-2.19.51.0.10.orig/bfd/elfcode.h ./bfd/elfcode.h
---- ../binutils-2.19.51.0.10.orig/bfd/elfcode.h	2009-06-22 16:16:08.000000000 +0100
-+++ ./bfd/elfcode.h	2009-06-22 16:20:00.000000000 +0100
-@@ -1170,6 +1170,20 @@ elf_checksum_contents (bfd *abfd,
+diff -rup ../binutils-2.19.51.0.11.orig/bfd/elfcode.h bfd/elfcode.h
+--- ../binutils-2.19.51.0.11.orig/bfd/elfcode.h	2009-07-14 11:23:27.000000000 +0100
++++ bfd/elfcode.h	2009-07-14 11:33:56.000000000 +0100
+@@ -1170,6 +1170,24 @@ elf_checksum_contents (bfd *abfd,
  
        if (i_shdr.contents)
  	(*process) (i_shdr.contents, i_shdr.sh_size, arg);
@@ -12,9 +12,13 @@ diff -rup ../binutils-2.19.51.0.10.orig/
 +	  sec = bfd_section_from_elf_index (abfd, count);
 +	  if (sec != NULL)
 +	    {
-+	      if (sec->contents == NULL
-+		  && ! bfd_malloc_and_get_section (abfd, sec, & sec->contents))
-+		continue;
++	      if (sec->contents == NULL)
++		{
++		  /* Force rereading from file.  */
++		  sec->flags &= ~SEC_IN_MEMORY;
++		  if (! bfd_malloc_and_get_section (abfd, sec, & sec->contents))
++		    continue;
++		}
 +	      if (sec->contents != NULL)
 +		(*process) (sec->contents, i_shdr.sh_size, arg);
 +	    }
@@ -22,9 +26,9 @@ diff -rup ../binutils-2.19.51.0.10.orig/
      }
  
    return TRUE;
-diff -rup ../binutils-2.19.51.0.10.orig/bfd/section.c ./bfd/section.c
---- ../binutils-2.19.51.0.10.orig/bfd/section.c	2009-06-22 16:16:08.000000000 +0100
-+++ ./bfd/section.c	2009-06-22 16:20:42.000000000 +0100
+diff -rup ../binutils-2.19.51.0.11.orig/bfd/section.c bfd/section.c
+--- ../binutils-2.19.51.0.11.orig/bfd/section.c	2009-07-14 11:23:27.000000000 +0100
++++ bfd/section.c	2009-07-14 11:33:26.000000000 +0100
 @@ -1477,7 +1477,7 @@ bfd_malloc_and_get_section (bfd *abfd, s
    if (sz == 0)
      return TRUE;


Index: binutils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/binutils/devel/binutils.spec,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -p -r1.167 -r1.168
--- binutils.spec	11 Jul 2009 21:25:27 -0000	1.167
+++ binutils.spec	14 Jul 2009 09:48:32 -0000	1.168
@@ -17,7 +17,7 @@
 Summary: A GNU collection of binary utilities
 Name: %{?cross}binutils%{?_with_debug:-debug}
 Version: 2.19.51.0.11
-Release: 24%{?dist}
+Release: 25%{?dist}
 License: GPLv3+
 Group: Development/Tools
 URL: http://sources.redhat.com/binutils
@@ -351,6 +351,9 @@ fi
 %endif # %{isnative}
 
 %changelog
+* Tue Jul 14 2009 Nick Clifton <nickc at redhat.com> 2.19.51.0.11-25
+- Fix build-id patch to avoid memory corruption.  (BZ 501582)
+
 * Sat Jul 11 2009 Jan Kratochvil <jan.kratochvil at redhat.com> 2.19.51.0.11-24
 - Provide uuencode output of the testsuite results.
 




More information about the fedora-extras-commits mailing list