re PR libgcc/61585 (Subscript-out-of-range in unwind-seh.c?)
PR libgcc/61585
* unwind-seh.c (_Unwind_GetGR): Check for proper
index range.
(_Unwind_SetGR): Likewise.
From-SVN: r211900
diff --git a/libgcc/unwind-seh.c b/libgcc/unwind-seh.c
index c8187b3..a221d9f 100644
--- a/libgcc/unwind-seh.c
+++ b/libgcc/unwind-seh.c
@@ -79,7 +79,7 @@
_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 @@
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;
}