diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-10 12:47:36 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-10 12:47:36 +0000 |
commit | b88dd4affdff9b8ab82096d7f031f2dacb1c2e98 (patch) | |
tree | 4a236afc8c546253482ea81d8e35e6284fc0c215 /gcc/ada/s-regpat.adb | |
parent | 80df182abd4bf220bf8136fb63164f672f53cee5 (diff) | |
download | gcc-b88dd4affdff9b8ab82096d7f031f2dacb1c2e98.tar.gz |
2007-09-10 Emmanuel Briot <briot@adacore.com>
* s-regpat.adb (Parse_Character_Class): Fix handling of empty character
classes ("[]").
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128333 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-regpat.adb')
-rwxr-xr-x | gcc/ada/s-regpat.adb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/s-regpat.adb b/gcc/ada/s-regpat.adb index c1e924797eb..2441271f0e5 100755 --- a/gcc/ada/s-regpat.adb +++ b/gcc/ada/s-regpat.adb @@ -1457,6 +1457,10 @@ package body System.Regpat is elsif not In_Range then Last_Value := Value; + if Parse_Pos > Expression'Last then + Fail ("Empty character class []"); + end if; + if Expression (Parse_Pos) = '-' and then Parse_Pos < Parse_End and then Expression (Parse_Pos + 1) /= ']' |