diff options
author | Nicholas Clark <nick@ccl4.org> | 2001-09-11 01:00:31 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-10 23:59:25 +0000 |
commit | a4c04bdcc508b6a45f83e703d0f82401445aa55b (patch) | |
tree | e62e6cb0f730a508358a8250a6c84ecc11bd7e0e /regcomp.c | |
parent | 6ea0e80736523dba6f43970534753e0773345f1a (diff) | |
download | perl-a4c04bdcc508b6a45f83e703d0f82401445aa55b.tar.gz |
Re: the remaining bugs in \x escapes (was Re: [PATCH] oct and hex in glorious 64 bit (with less bugs) (was Re: hex and oct again (was Re: FreeBSD MD5 crypt? Re: crypt/hex/oct and Unicode?)))
Message-ID: <20010911000031.G1512@plum.flirble.org>
p4raw-id: //depot/perl@11990
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -3039,7 +3039,8 @@ tryagain: vFAIL("Missing right brace on \\x{}"); } else { - I32 flags = PERL_SCAN_ALLOW_UNDERSCORES; + I32 flags = PERL_SCAN_ALLOW_UNDERSCORES + | PERL_SCAN_DISALLOW_PREFIX; numlen = e - p - 1; ender = grok_hex(p + 1, &numlen, &flags, NULL); if (ender > 0xff) @@ -3053,7 +3054,7 @@ tryagain: } } else { - I32 flags = 0; + I32 flags = PERL_SCAN_DISALLOW_PREFIX; numlen = 2; ender = grok_hex(p, &numlen, &flags, NULL); p += numlen; @@ -3449,7 +3450,8 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state) case 'a': value = ASCII_TO_NATIVE('\007');break; case 'x': if (*RExC_parse == '{') { - I32 flags = PERL_SCAN_ALLOW_UNDERSCORES; + I32 flags = PERL_SCAN_ALLOW_UNDERSCORES + | PERL_SCAN_DISALLOW_PREFIX; e = strchr(RExC_parse++, '}'); if (!e) vFAIL("Missing right brace on \\x{}"); @@ -3459,7 +3461,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state) RExC_parse = e + 1; } else { - I32 flags = 0; + I32 flags = PERL_SCAN_DISALLOW_PREFIX; numlen = 2; value = grok_hex(RExC_parse, &numlen, &flags, NULL); RExC_parse += numlen; |