Fix for SEGV in ext/B/t/xref.t on OpenBSD
Steve Peters [Tue, 14 Jun 2005 08:16:38 +0000 (03:16 -0500)]
Message-ID: <20050614131638.GA24771@mccoy.peters.homeunix.org>

p4raw-id: //depot/perl@24838

ext/B/B.xs

index cedaf08..d317fb9 100644 (file)
@@ -1214,8 +1214,8 @@ SvPV(sv)
        B::PV   sv
     CODE:
         ST(0) = sv_newmortal();
-        if( SvPOK(sv) ) { 
-            sv_setpvn(ST(0), SvPVX_const(sv), SvCUR(sv));
+        if( SvPOK(sv) ) {
+            sv_setpv(ST(0), SvPV_nolen_const(sv));
             SvFLAGS(ST(0)) |= SvUTF8(sv);
         }
         else {