summaryrefslogtreecommitdiff
path: root/lib/Ninka/CommentExtractor.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Ninka/CommentExtractor.pm')
-rw-r--r--lib/Ninka/CommentExtractor.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Ninka/CommentExtractor.pm b/lib/Ninka/CommentExtractor.pm
index 8a2e66f..c01d91f 100644
--- a/lib/Ninka/CommentExtractor.pm
+++ b/lib/Ninka/CommentExtractor.pm
@@ -66,6 +66,10 @@ sub create_head_cmd {
sub execute_command {
my ($command) = @_;
+ if ($command =~ /&/) {
+ die "illegal file name in command to be executed [$command]";
+ }
+
my ($child_in, $child_out, $child_err);
$child_err = gensym();
my $pid = open3($child_in, $child_out, $child_err, $command);