Oops. 1 NUL termination assumption remains in Perl_gv_fetchpvn_flags
Nicholas Clark [Wed, 1 Feb 2006 22:03:37 +0000 (22:03 +0000)]
p4raw-id: //depot/perl@27044

gv.c

diff --git a/gv.c b/gv.c
index f60d0dc..5b75c03 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -816,7 +816,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
                name_cursor++;
            name_cursor++;
            name = name_cursor;
-           if (!*name)
+           if (name == name_end)
                return gv ? gv : (GV*)*hv_fetchs(PL_defstash, "main::", TRUE);
        }
     }