summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-23 01:22:10 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-23 01:22:10 +0000
commit82e2bc1b5ed8357f0ef7e3beabe4a224aba43182 (patch)
tree6cad65a79a9b3ebf9358bfd6800c171960bc6085 /util.c
parent934abaf167adb702576b251f37fdd3e89d62e20b (diff)
downloadperl-82e2bc1b5ed8357f0ef7e3beabe4a224aba43182.tar.gz
Purify: Array bounds read: reading one byte before the buffer.
p4raw-id: //depot/perl@15437
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index d95f1e00e1..e79dc32f09 100644
--- a/util.c
+++ b/util.c
@@ -4018,7 +4018,7 @@ Perl_new_vstring(pTHX_ char *s, SV *sv)
/* this is atoi() that tolerates underscores */
char *end = pos;
UV mult = 1;
- if ( *(s-1) == '_') {
+ if ( s > pos && *(s-1) == '_') {
mult = 10;
}
while (--end >= s) {