This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
tokeq() could read unallocated field in argument
authorGurusamy Sarathy <gsar@cpan.org>
Thu, 4 May 2000 16:52:29 +0000 (16:52 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Thu, 4 May 2000 16:52:29 +0000 (16:52 +0000)
p4raw-id: //depot/perl@6063

toke.c

diff --git a/toke.c b/toke.c
index 10273a0..ecaace3 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -896,7 +896,7 @@ S_tokeq(pTHX_ SV *sv)
        goto finish;
 
     s = SvPV_force(sv, len);
-    if (SvIVX(sv) == -1)
+    if (SvTYPE(sv) >= SVt_PVIV && SvIVX(sv) == -1)
        goto finish;
     send = s + len;
     while (s < send && *s != '\\')