summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-07-09 17:49:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-07-09 17:49:23 +0000
commitbd4d542e5b427b91bce2006fb0145990303a1f8f (patch)
treecd39f6f1113156b2d740addb256946d434579e05 /toke.c
parent15f2720f688e52d85b8eea28e822e78addd218e7 (diff)
downloadperl-bd4d542e5b427b91bce2006fb0145990303a1f8f.tar.gz
Integrate:
[ 20095] Update Changes. [ 20096] More Darwin/MacOSX paths twiddling. [ 20097] Fix for the 'print v65' plus safety tweaks from Rafael. [ 20098] Fixes from Ron Kimball. [ 20099] No more no more. Errrm, no longer no more. [ 20100] Detypo. p4raw-link: @20100 on //depot/perl: 6e51eab0a82201d3fd490bc3fc504744c5072acc p4raw-link: @20099 on //depot/maint-5.8/perl: 15f2720f688e52d85b8eea28e822e78addd218e7 p4raw-link: @20098 on //depot/perl: 8fa7268995e3f23d5792dead89f0dc1b48294109 p4raw-link: @20097 on //depot/perl: 3e884cbfde531bbaf80ff3ded5ed1ee9b9a9f16e p4raw-link: @20096 on //depot/perl: f9655257b2ff49a04bcf20c32c0590f5bc23526e p4raw-link: @20095 on //depot/maint-5.8/perl: 521ba741b5feaed1770f19941f586753172503f0 p4raw-id: //depot/maint-5.8/perl@20101 p4raw-integrated: from //depot/perl@20099 'copy in' hints/freebsd.sh (@20026..) pod/perldata.pod (@20089..) 'merge in' hints/darwin.sh (@20083..) toke.c (@20084..)
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/toke.c b/toke.c
index d99cd917bc..573c240f06 100644
--- a/toke.c
+++ b/toke.c
@@ -7964,15 +7964,14 @@ Perl_scan_vstring(pTHX_ char *s, SV *sv)
char *pos = s;
char *start = s;
if (*pos == 'v') pos++; /* get past 'v' */
- while (isDIGIT(*pos) || *pos == '_')
- pos++;
+ while (pos < PL_bufend && (isDIGIT(*pos) || *pos == '_'))
+ pos++;
if ( *pos != '.') {
/* this may not be a v-string if followed by => */
start = pos;
- if (isSPACE(*start))
- start = skipspace(start);
- if ( *start == '=' && start[1] == '>' )
- {
+ while (start < PL_bufend && isSPACE(*start))
+ ++start;
+ if ((PL_bufend - start) >= 2 && *start == '=' && start[1] == '>' ) {
/* return string not v-string */
sv_setpvn(sv,(char *)s,pos-s);
return pos;
@@ -8015,13 +8014,13 @@ Perl_scan_vstring(pTHX_ char *s, SV *sv)
sv_catpvn(sv, (const char*)tmpbuf, tmpend - tmpbuf);
if (!UNI_IS_INVARIANT(NATIVE_TO_UNI(rev)))
SvUTF8_on(sv);
- if (*pos == '.' && isDIGIT(pos[1]))
+ if (pos + 1 < PL_bufend && *pos == '.' && isDIGIT(pos[1]))
s = ++pos;
else {
s = pos;
break;
}
- while (isDIGIT(*pos) || *pos == '_')
+ while (pos < PL_bufend && (isDIGIT(*pos) || *pos == '_'))
pos++;
}
SvPOK_on(sv);