Re: [PATCH perl@9424] isn't numeric warning
authorRobin Barker <RMBarker@cpan.org>
Mon, 9 Apr 2001 14:58:04 +0000 (15:58 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 9 Apr 2001 13:07:53 +0000 (13:07 +0000)
Message-Id: <200104091358.OAA24811@tempest.npl.co.uk>

(This corrects the case where the "isn't numeric" string contains \0s
and is longer than the temporary buffer, and contains \0 at the point
the string would be truncated by "...".)

p4raw-id: //depot/perl@9660

sv.c

diff --git a/sv.c b/sv.c
index 1737e8f..a891a88 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -1469,7 +1469,7 @@ S_not_a_number(pTHX_ SV *sv)
            *d++ = toCTRL(ch);
        }
     }
-    if (*s) {
+    if (*s < end) {
        *d++ = '.';
        *d++ = '.';
        *d++ = '.';