[binutils-gdb/binutils-2_29-branch] Apply:

Eric Christopher echristo@sourceware.org
Wed Apr 4 21:05:00 GMT 2018


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

commit af0200d544c0a00a805f2ed86e9e5776cca22266
Author: Eric Christopher <echristo@gmail.com>
Date:   Wed Nov 8 14:03:55 2017 -0800

    Apply:
    
    2017-11-08  Kyle Butt  <iteratee@google.com>
    
            * object.cc (do_find_special_sections): Fix a thinko with memmem return
            values and check for != NULL rather than == 0.

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

diff --git a/gold/ChangeLog b/gold/ChangeLog
index b48c279..ddcc0d7 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,11 @@
+2018-04-04  Eric Christopher  <echristo@gmail.com>
+
+	Apply from master:
+        2017-11-08  Kyle Butt  <iteratee@google.com>
+
+        * object.cc (do_find_special_sections): Fix a thinko with memmem return
+        values and check for !=	NULL rather than == 0.
+
 2018-03-20  Sriraman Tallam  <tmsriram@google.com>
 
 	Apply from master:
diff --git a/gold/object.cc b/gold/object.cc
index 4110686..0135651 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", 11) == 0
+	      && (memmem(names, sd->section_names_size, "debug_info", 11) != NULL
 		  || memmem(names, sd->section_names_size,
-			    "debug_types", 12) == 0)));
+			    "debug_types", 12) != NULL)));
 }
 
 // Read the sections and symbols from an object file.



More information about the Binutils-cvs mailing list