Change 34136 by [EMAIL PROTECTED] on 2008/07/13 04:04:31

        assert() that the pointer passed to Perl_sv_chop() lies within the
        buffer of the SV.

Affected files ...

... //depot/perl/sv.c#1546 edit

Differences ...

==== //depot/perl/sv.c#1546 (text) ====
Index: perl/sv.c
--- perl/sv.c#1545~34128~       2008-07-11 12:42:14.000000000 -0700
+++ perl/sv.c   2008-07-12 21:04:31.000000000 -0700
@@ -4401,6 +4401,10 @@
     }
     assert(ptr > SvPVX_const(sv));
     SV_CHECK_THINKFIRST(sv);
+    if (SvLEN(sv))
+       assert(delta <= SvLEN(sv));
+    else
+       assert(delta <= SvCUR(sv));
 
     if (!SvOOK(sv)) {
        if (!SvLEN(sv)) { /* make copy of shared string */
End of Patch.

Reply via email to