Purify: Array bounds read: reading one byte before the buffer.
Jarkko Hietaniemi [Sat, 23 Mar 2002 01:22:10 +0000 (01:22 +0000)]
p4raw-id: //depot/perl@15437

util.c

diff --git a/util.c b/util.c
index d95f1e0..e79dc32 100644 (file)
--- 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) {