$& segfaults if you trick it
Simon Cozens [Fri, 7 Jul 2000 11:26:09 +0000 (11:26 +0000)]
Message-ID: <slrn8mbfif.ead.simon@justanother.perlhacker.org>

p4raw-id: //depot/cfgperl@6336

mg.c

diff --git a/mg.c b/mg.c
index b1049c5..aee2790 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -614,6 +614,9 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
            {
                i = t1 - s1;
                s = rx->subbeg + s1;
+                if (!rx->subbeg)
+                   break;
+
              getrx:
                if (i >= 0) {
                    bool was_tainted;