Commit 5c7dac8a by Kai Tietz Committed by Kai Tietz

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
parent 0379033b
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> 2014-05-22 Nick Clifton <nickc@redhat.com>
* config/msp430/t-msp430 (HOST_LIBGCC2_CFLAGS): Add * config/msp430/t-msp430 (HOST_LIBGCC2_CFLAGS): Add
......
...@@ -79,7 +79,7 @@ struct _Unwind_Context ...@@ -79,7 +79,7 @@ struct _Unwind_Context
_Unwind_Word _Unwind_Word
_Unwind_GetGR (struct _Unwind_Context *c, int index) _Unwind_GetGR (struct _Unwind_Context *c, int index)
{ {
if (index < 0 || index > 2) if (index < 0 || index >= 2)
abort (); abort ();
return c->reg[index]; return c->reg[index];
} }
...@@ -89,7 +89,7 @@ _Unwind_GetGR (struct _Unwind_Context *c, int index) ...@@ -89,7 +89,7 @@ _Unwind_GetGR (struct _Unwind_Context *c, int index)
void void
_Unwind_SetGR (struct _Unwind_Context *c, int index, _Unwind_Word val) _Unwind_SetGR (struct _Unwind_Context *c, int index, _Unwind_Word val)
{ {
if (index < 0 || index > 2) if (index < 0 || index >= 2)
abort (); abort ();
c->reg[index] = val; c->reg[index] = val;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment