projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5c84c3
)
s-regpat.adb (Parse_Character_Class): Fix handling of empty character classes ("...
author
Emmanuel Briot
<briot@adacore.com>
Mon, 10 Sep 2007 12:47:36 +0000
(14:47 +0200)
committer
Arnaud Charlet
<charlet@gcc.gnu.org>
Mon, 10 Sep 2007 12:47:36 +0000
(14:47 +0200)
2007-09-10 Emmanuel Briot <briot@adacore.com>
* s-regpat.adb (Parse_Character_Class): Fix handling of empty character
classes ("[]").
From-SVN: r128333
gcc/ada/s-regpat.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/s-regpat.adb
b/gcc/ada/s-regpat.adb
index c1e924797ebc826656512df961a8f9f3548bc427..2441271f0e5accc404dca135e3c7c1f8b53aa2d3 100755
(executable)
--- 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) /= ']'