This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_28-branch] Fix incorrect byte counts.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d6395110302cc2af093b768a0364740191301b5f

commit d6395110302cc2af093b768a0364740191301b5f
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Thu Jan 12 11:51:18 2017 -0800

    Fix incorrect byte counts.
    
    gold/
    	* object.cc (Sized_relobj_file): Fix byte counts for calls to memmem.

Diff:
---
 gold/ChangeLog | 4 ++++
 gold/object.cc | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index 6cc9752..991d7b8 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-12  Cary Coutant  <ccoutant@gmail.com>
+
+	* object.cc (Sized_relobj_file): Fix byte counts for calls to memmem.
+
 2017-01-11  Cary Coutant  <ccoutant@gmail.com>
 
 	PR gold/21040
diff --git a/gold/object.cc b/gold/object.cc
index e900864..4110686 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -816,9 +816,9 @@ Sized_relobj_file<size, big_endian>::do_find_special_sections(
   return (this->has_eh_frame_
 	  || (!parameters->options().relocatable()
 	      && parameters->options().gdb_index()
-	      && (memmem(names, sd->section_names_size, "debug_info", 12) == 0
-		  || memmem(names, sd->section_names_size, "debug_types",
-			    13) == 0)));
+	      && (memmem(names, sd->section_names_size, "debug_info", 11) == 0
+		  || memmem(names, sd->section_names_size,
+			    "debug_types", 12) == 0)));
 }
 
 // Read the sections and symbols from an object file.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]