diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-10-02 21:49:15 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-10-02 21:49:15 +0000 |
commit | 95899a2a29f7dc4950eff7768b479a7492599135 (patch) | |
tree | 97a4d51a6917e1f374b37f1b33bf871df4c86b32 /sv.c | |
parent | 53cd54806aabd2c7159c2bd2a9152721d6b02e08 (diff) | |
download | perl-95899a2a29f7dc4950eff7768b479a7492599135.tar.gz |
Perl_sv_recode_to_utf8 shouldn't be returning SvPVX(sv) without
any check on whether it's valid.
p4raw-id: //depot/perl@23344
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -12283,8 +12283,9 @@ Perl_sv_recode_to_utf8(pTHX_ SV *sv, SV *encoding) FREETMPS; LEAVE; SvUTF8_on(sv); + return SvPVX(sv); } - return SvPVX(sv); + return SvPOKp(sv) ? SvPVX(sv) : NULL; } /* |