summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-23 16:20:31 +0000
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2014-06-23 16:20:31 +0000
commit761d3cae9ae2170561b7ff586bfea48ceea9908a (patch)
treedbfcad22e395731023e7d6873c7e74762b738fc7 /libgcc
parenteb8fdbe9c05d8d23fc667c435e9ce24a6b7d0727 (diff)
downloadgcc-761d3cae9ae2170561b7ff586bfea48ceea9908a.tar.gz
PR libgcc/61585
* unwind-seh.c (_Unwind_GetGR): Check for proper index range. (_Unwind_SetGR): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211900 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog7
-rw-r--r--libgcc/unwind-seh.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 04c8f73706e..c4a35a896b9 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,10 @@
+2014-06-23 Kai Tietz <ktietz@redhat.com>
+
+ PR libgcc/61585
+ * unwind-seh.c (_Unwind_GetGR): Check for proper
+ index range.
+ (_Unwind_SetGR): Likewise.
+
2014-05-22 Nick Clifton <nickc@redhat.com>
* config/msp430/t-msp430 (HOST_LIBGCC2_CFLAGS): Add
diff --git a/libgcc/unwind-seh.c b/libgcc/unwind-seh.c
index c8187b37a16..a221d9ffeac 100644
--- a/libgcc/unwind-seh.c
+++ b/libgcc/unwind-seh.c
@@ -79,7 +79,7 @@ struct _Unwind_Context
_Unwind_Word
_Unwind_GetGR (struct _Unwind_Context *c, int index)
{
- if (index < 0 || index > 2)
+ if (index < 0 || index >= 2)
abort ();
return c->reg[index];
}
@@ -89,7 +89,7 @@ _Unwind_GetGR (struct _Unwind_Context *c, int index)
void
_Unwind_SetGR (struct _Unwind_Context *c, int index, _Unwind_Word val)
{
- if (index < 0 || index > 2)
+ if (index < 0 || index >= 2)
abort ();
c->reg[index] = val;
}