summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch
blob: aacbfef7d6e489d875088cc391a68d4cd0081135 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Upstream-Status: Pending

binutils build fails on Fedora18+ due to over array bounds issue: 
binutils-2.23.1/opcodes/rl78-dis.c:230:13: error: array subscript is above array bounds [-Werror=array-bounds]
      if (oper->use_es && indirect_type (oper->type))
              ^

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>

--- binutils-2.23.1/opcodes/rl78-dis.c.orig	2013-03-12 22:17:47.664361066 -0500
+++ binutils-2.23.1/opcodes/rl78-dis.c	2013-03-12 23:39:51.383460914 -0500
@@ -221,7 +221,7 @@
 
 	    case '0':
 	    case '1':
-	      oper = opcode.op + *s - '0';
+	      oper = &opcode.op[*s - '0'];
 	      if (do_bang)
 		PC ('!');