diff options
author | Kai Tietz <ktietz@redhat.com> | 2014-06-23 18:20:31 +0200 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2014-06-23 18:20:31 +0200 |
commit | 5c7dac8aa1a2ccc42325dd680e515c64a797bef4 (patch) | |
tree | dbfcad22e395731023e7d6873c7e74762b738fc7 /libgcc/unwind-seh.c | |
parent | 0379033b6388ad245e8926766929012c27b6f20a (diff) | |
download | gcc-5c7dac8aa1a2ccc42325dd680e515c64a797bef4.zip gcc-5c7dac8aa1a2ccc42325dd680e515c64a797bef4.tar.gz gcc-5c7dac8aa1a2ccc42325dd680e515c64a797bef4.tar.bz2 |
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
Diffstat (limited to 'libgcc/unwind-seh.c')
-rw-r--r-- | libgcc/unwind-seh.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ 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; } |