Invalid pointer operation in the regex class
Original Reporter info from Mantis: jcmoraisjr
-
Reporter name: Joao Morais
Original Reporter info from Mantis: jcmoraisjr
- Reporter name: Joao Morais
Description:
I think these assignments fixes some random invalid pointer exception when destroying the regex class. diff against fixes_2_4
===============================
$ svn diff packages/regexpr/src/regex.pp
Index: packages/regexpr/src/regex.pp
===================================================================
--- packages/regexpr/src/regex.pp (revisão 13588)
+++ packages/regexpr/src/regex.pp (cópia de trabalho)
@@ -1031,6 +1031,7 @@
FStateTable[FStateCount].sdNextState1 := i+FStateTable[FStateCount].sdNextState1+ (EndStateAtom-StartStateAtom) *i;
if FStateTable[FStateCount].sdNextState2 in [StartStateAtom..EndStateAtom+1] then
FStateTable[FStateCount].sdNextState2 := i+FStateTable[FStateCount].sdNextState2 + (EndStateAtom-StartStateAtom) *i;
+ FStateTable[FStateCount].sdMatchType := mtNone;
inc(FStateCount);
if FStateCount=length(FStateTable) then
@@ -1050,6 +1051,7 @@
FStateTable[FStateCount].sdNextState1 := i+FStateTable[FStateCount].sdNextState1+ (EndStateAtom-StartStateAtom) * i+(i-n+1);
if FStateTable[FStateCount].sdNextState2 in [StartStateAtom..EndStateAtom+1] then
FStateTable[FStateCount].sdNextState2 := i+FStateTable[FStateCount].sdNextState2 + (EndStateAtom-StartStateAtom) * i+(i-n+1);
+ FStateTable[FStateCount].sdMatchType := mtNone;
inc(FStateCount);
if FStateCount=length(FStateTable) then
Mantis conversion info:
- Mantis ID: 14425
- Platform: all
- Version: 2.2.5
- Fixed in version: 3.0.0
- Fixed in revision: 19020 (#7d717cde)