This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix for SEGV in ext/B/t/xref.t on OpenBSD
authorSteve Peters <steve@fisharerojo.org>
Tue, 14 Jun 2005 08:16:38 +0000 (03:16 -0500)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 14 Jun 2005 13:22:20 +0000 (13:22 +0000)
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 {