diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-01 14:08:26 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-01 14:08:26 +0000 |
commit | 0da60cf5bdbc37955569c69225af7f1d6b5bb35a (patch) | |
tree | 05d9667b7fd2ced158f2af3fc15a73f6ec7070b0 /regcomp.c | |
parent | 15c782025dad5d6987b21b64d42859da9bcd79d3 (diff) | |
download | perl-0da60cf5bdbc37955569c69225af7f1d6b5bb35a.tar.gz |
Be careful to pull chars from the varargs stack when
formatting chars.
p4raw-id: //depot/perl@12292
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2879,9 +2879,10 @@ tryagain: /* a lovely hack--pretend we saw [\pX] instead */ RExC_end = strchr(RExC_parse, '}'); if (!RExC_end) { + U8 c = (U8)*RExC_parse; RExC_parse += 2; RExC_end = oldregxend; - vFAIL2("Missing right brace on \\%c{}", UCHARAT(RExC_parse - 2)); + vFAIL2("Missing right brace on \\%c{}", c); } RExC_end++; } @@ -3421,13 +3422,14 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state) case 'p': case 'P': if (*RExC_parse == '{') { + U8 c = (U8)value; e = strchr(RExC_parse++, '}'); if (!e) - vFAIL2("Missing right brace on \\%c{}", value); + vFAIL2("Missing right brace on \\%c{}", c); while (isSPACE(UCHARAT(RExC_parse))) RExC_parse++; if (e == RExC_parse) - vFAIL2("Empty \\%c{}", value); + vFAIL2("Empty \\%c{}", c); n = e - RExC_parse; while (isSPACE(UCHARAT(RExC_parse + n - 1))) n--; |