From: Michael Fig Date: Sat, 27 Nov 2010 13:44:26 +0000 (-0800) Subject: [perl #79680] overload 1.10 sprintf fails taint checking X-Git-Tag: v5.13.8~181^2~120 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/10b78b9b0da48b3a3f28075f3114621a40a43997?ds=sidebyside [perl #79680] overload 1.10 sprintf fails taint checking [Note from the committer: I cannot reproduce the bug this is intended to fix. I suspect the author has a botched Scalar::Util installation. But it *does* make the code go faster, as it uses fewer ops. That’s my reason for appling it.] --- diff --git a/lib/overload.pm b/lib/overload.pm index 31c88b7..dbc3de6 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -99,7 +99,7 @@ sub AddrRef { my $class_prefix = defined($class) ? "$class=" : ""; my $type = Scalar::Util::reftype($_[0]); my $addr = Scalar::Util::refaddr($_[0]); - return sprintf("$class_prefix$type(0x%x)", $addr); + return sprintf("%s%s(0x%x)", $class_prefix, $type, $addr); } *StrVal = *AddrRef;