This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid tainting boolean return value of s///
authorDavid Mitchell <davem@iabyn.com>
Tue, 19 Dec 2017 14:52:49 +0000 (14:52 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 19 Dec 2017 15:15:02 +0000 (15:15 +0000)
commit5e501dc57f49d52e0f2a302181be287457c0b736
tree456a97ff9eaf94ad1ed0f7aee374edb97399ce97
parentc352ee5f96ca31651e1bac4e2f72702d961e700c
avoid tainting boolean return value of s///

RT #132385

s/// normally returns an integer count, but sometimes for efficiency it
will return a boolean instead (PL_sv_yes/PL_sv_zero).

In these cases, don't try to taint the return value, since it will die
with 'Modification of a read-only value'.
pp_hot.c
t/op/taint.t