Subject: | Suggested policy: format string vulnerabilities |
printf("some format string containing $unsafe text %d", $x);
This would probably be better written as
printf("some format string containing %s text %d", $unsafe, $x);
In Perl this isn't quite the serious stack-smashing vulnerability it can
be in C, and taint mode helps too. But it's still not a safe way to
program. Perlcritic should have a policy catching non-literal format
strings used in printf and sprintf.