Perl_screaminstr() must be called with littlestr as a PVBM.
Nicholas Clark [Fri, 8 Dec 2006 22:56:08 +0000 (22:56 +0000)]
p4raw-id: //depot/perl@29489

util.c

diff --git a/util.c b/util.c
index 3ba64e0..eefb5a5 100644 (file)
--- a/util.c
+++ b/util.c
@@ -754,6 +754,8 @@ Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift
     register const unsigned char *littleend;
     I32 found = 0;
 
+    assert(SvTYPE(littlestr) == SVt_PVBM);
+
     if (*old_posp == -1
        ? (pos = PL_screamfirst[BmRARE(littlestr)]) < 0
        : (((pos = *old_posp), pos += PL_screamnext[pos]) == 0)) {