summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorSADAHIRO Tomoyuki <BQW10602@nifty.com>2004-03-22 00:19:22 +0900
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-03-21 13:18:01 +0000
commit06a4563224066c07e70fee61255fea3909c889cc (patch)
treed6682fb8ecb9856c756fff4f90d9837e4f9a022f /sv.c
parent0f20d7dff4791320a87fca61a4e4d4bb7344f44c (diff)
downloadperl-06a4563224066c07e70fee61255fea3909c889cc.tar.gz
Re: [perl #27803] perl crashes when utf8::upgrade($offsetOK_scalar)
Message-Id: <20040321151828.DAC6.BQW10602@nifty.com> p4raw-id: //depot/perl@22545
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index f4b369679f..02e2b55cc4 100644
--- a/sv.c
+++ b/sv.c
@@ -3494,7 +3494,8 @@ Perl_sv_utf8_upgrade_flags(pTHX_ register SV *sv, I32 flags)
}
if (hibit) {
STRLEN len;
-
+ SvOOK_off(sv);
+ s = (U8*)SvPVX(sv);
len = SvCUR(sv) + 1; /* Plus the \0 */
SvPVX(sv) = (char*)bytes_to_utf8((U8*)s, &len);
SvCUR(sv) = len - 1;