This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Avoid coff OOM
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 11 Nov 2014 22:48:10 +1030
- Subject: Re: Avoid coff OOM
- Authentication-results: sourceware.org; auth=none
- References: <20141111120210 dot GB21684 at bubble dot grove dot modra dot org>
I missed this use of a loop induction variable outside the loop.
PR binutils/17512
* coffcode.h (coff_slurp_line_table): Use updated lineno_count
when building func_table.
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 6bc8014..f10654e 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -4613,7 +4613,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect)
alent **p = func_table;
unsigned int i;
- for (i = 0; i < counter; i++)
+ for (i = 0; i < asect->lineno_count; i++)
if (lineno_cache[i].line_number == 0)
*p++ = &lineno_cache[i];
--
Alan Modra
Australia Development Lab, IBM