Skip to content

Commit 99ea7cd

Browse files
author
John Peacock
committed
flow: Merged <feature> 'RT-118087' to <develop> ('develop').
2 parents f7cd74c + 4d4fcbe commit 99ea7cd

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

Makefile.PL

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ sub write_makefile
5050
'Test::More' => 0.45,
5151
'File::Temp' => 0.13,
5252
'parent' => 0.221,
53+
'Test::Taint' => 1.06,
5354
);
5455

5556
WriteMakefile( VERSION => '0.9917',

t/11_taint.t

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!perl -T
2+
use Test::More qw/no_plan/;
3+
4+
use Test::Taint;
5+
use version;
6+
7+
taint_checking_ok();
8+
my $v = 'v1.2.3';
9+
taint($v);
10+
tainted_ok($v);
11+
my $v2 = version->parse($v);
12+
isnt("$v2", '', 'Correctly parsed the tainted string');
13+
tainted_ok($v2);
14+
15+
my $vs = "$v2";
16+
is $v2, 'v1.2.3';

vutil/vutil.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,11 @@ Perl_vstringify(pTHX_ SV *vs)
968968
if (svp) {
969969
SV *pv;
970970
pv = *svp;
971-
if ( SvPOK(pv) )
971+
if ( SvPOK(pv)
972+
#if PERL_VERSION_LT(5,17,2)
973+
|| SvPOKp(pv)
974+
#endif
975+
)
972976
return newSVsv(pv);
973977
else
974978
return &PL_sv_undef;

0 commit comments

Comments
 (0)