Add some null checks and bounds checks.
authorRaja R Harinath <harinath@hurrynot.org>
Mon, 7 Sep 2009 16:25:50 +0000 (16:25 -0000)
committerRaja R Harinath <harinath@hurrynot.org>
Mon, 7 Sep 2009 16:25:50 +0000 (16:25 -0000)
commite8d4a9721168da0865d1eae1bf9e165690a2ebfc
tree1ecbed3b6e9bc2efb929ff6e238f7c3b830cae08
parent904d1b71f37a3bee10bbb9719cdc7e1b02ac053e
Add some null checks and bounds checks.

* Regex.cs (default_startat): New.  Replaces the fragment
'RightToLeft ?  input.Length : 0' with a null-safe variant.
(Replace) <string variant>: Add null checks for argument strings.
(Split): Likewise.
(.ctor): Likewise.  Validate regex options partially.
(Match): Add null check on string arguments, and bounds checks for
offset and length arguments.

svn path=/trunk/mcs/; revision=141457
mcs/class/System/System.Text.RegularExpressions/ChangeLog
mcs/class/System/System.Text.RegularExpressions/Regex.cs
mcs/class/System/Test/System.Text.RegularExpressions/RegexReplaceTests.cs
mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs