diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-30 08:42:21 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-30 08:42:21 +0000 |
commit | 3ee749b1736ca72ba20fc30f759fa119a750a4c6 (patch) | |
tree | d75571b4eae4fcfdca76de46afdc66dc8832cbf5 /regex.c | |
parent | 35b21a12c03765244d32b6400a100124f35df091 (diff) |
* eval.c (rb_f_eval): can't modify untainted binding.
* regex.c (re_compile_pattern): should preverve p0 value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r-- | regex.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1544,11 +1544,15 @@ re_compile_pattern(pattern, size, bufp) case 'M': case 'C': case 'c': - p0 = --p; - c = read_special(p, pend, &p0); - if (c > 255) goto invalid_escape; - p = p0; - had_num_literal = 1; + { + char *pp; + + --p; + c = read_special(p, pend, &pp); + if (c > 255) goto invalid_escape; + p = pp; + had_num_literal = 1; + } break; default: |