This is the mail archive of the binutils@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]

[PATCH] gas/config: increase array size by one


2010-08-12  Sebastian Andrzej Siewior  <sebastian@breakpoint.cc>

	* config/tc-d10v.c (do_assemble): increase size of name by one.
	* config/tc-m68hc11.c (md_assemble): likewise.
	* config/tc-microblaze.c (md_assemble): likewise.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
| ../../binutils-2.18/gas/config/tc-m68hc11.c
| cc1: warnings being treated as errors
| ../../binutils-2.18/gas/config/tc-m68hc11.c: In function 'md_assemble':
| ../../binutils-2.18/gas/config/tc-m68hc11.c:2477: error: array subscript
| is above array bounds

 gas/ChangeLog              |    6 ++++++
 gas/config/tc-d10v.c       |    2 +-
 gas/config/tc-m68hc11.c    |    2 +-
 gas/config/tc-microblaze.c |    2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c
index d0c3129..7caab7a 100644
--- a/gas/config/tc-d10v.c
+++ b/gas/config/tc-d10v.c
@@ -1410,7 +1410,7 @@ do_assemble (char *str, struct d10v_opcode **opcode)
 {
   unsigned char *op_start, *op_end;
   char *save;
-  char name[20];
+  char name[21];
   int nlen = 0;
   expressionS myops[6];
 
diff --git a/gas/config/tc-m68hc11.c b/gas/config/tc-m68hc11.c
index c314961..eab1d27 100644
--- a/gas/config/tc-m68hc11.c
+++ b/gas/config/tc-m68hc11.c
@@ -2389,7 +2389,7 @@ md_assemble (char *str)
 
   unsigned char *op_start, *op_end;
   char *save;
-  char name[20];
+  char name[21];
   int nlen = 0;
   operand operands[M6811_MAX_OPERANDS];
   int nb_operands = 0;
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index e1c4953..852aaf6 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -799,7 +799,7 @@ md_assemble (char * str)
   unsigned isize;
   unsigned int immed, temp;
   expressionS exp;
-  char name[20];
+  char name[21];
 
   /* Drop leading whitespace.  */
   while (ISSPACE (* str))
-- 
1.7.1


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