This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold commit] Fix incorrect byte counts
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Thu, 12 Jan 2017 11:54:31 -0800
- Subject: [gold commit] Fix incorrect byte counts
- Authentication-results: sourceware.org; auth=none
Thanks to Igor Kudrin for noticing this bug...
-cary
2017-01-12 Cary Coutant <ccoutant@gmail.com>
gold/
* object.cc (Sized_relobj_file): Fix byte counts for calls to memmem.
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.