From: Rafael Garcia-Suarez Date: Thu, 16 Nov 2006 17:36:44 +0000 (+0100) Subject: Re: [perl #32687] Encode::is_utf8 on tainted UTF8 string X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a1ad65530dc2cbd7005009977b9830f483720573;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #32687] Encode::is_utf8 on tainted UTF8 string Message-ID: <20061116173644.4412f66f@grubert.mandriva.com> p4raw-id: //depot/perl@30693 --- diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs index 895819b..ba2bf62 100644 --- a/ext/Encode/Encode.xs +++ b/ext/Encode/Encode.xs @@ -757,15 +757,11 @@ CODE: { if (SvGMAGICAL(sv)) /* it could be $1, for example */ sv = newSVsv(sv); /* GMAGIG will be done */ - if (SvPOK(sv)) { RETVAL = SvUTF8(sv) ? TRUE : FALSE; if (RETVAL && check && !is_utf8_string((U8*)SvPVX(sv), SvCUR(sv))) RETVAL = FALSE; - } else { - RETVAL = FALSE; - } if (sv != ST(0)) SvREFCNT_dec(sv); /* it was a temp copy */ }