Bug 481760: myngle.com crash due to incorrect compiled regexp end-of-string check, r=brendan

This commit is contained in:
David Mandelin 2009-03-09 11:21:03 -07:00
parent 480a780c0c
commit b151fe5042

View File

@ -2149,7 +2149,7 @@ class RegExpNativeCompiler {
} }
} }
LIns* to_fail = lir->insBranch(LIR_jf, lir->ins2(LIR_lt, pos, cpend), 0); LIns* to_fail = lir->insBranch(LIR_jf, lir->ins2(LIR_lt, pos, lir->ins2(LIR_sub, cpend, lir->insImm(2))), 0);
fails.add(to_fail); fails.add(to_fail);
LIns* text_word = lir->insLoad(LIR_ld, pos, lir->insImm(0)); LIns* text_word = lir->insLoad(LIR_ld, pos, lir->insImm(0));
LIns* comp_word = useFastCI ? LIns* comp_word = useFastCI ?