diff options
| author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-09-01 18:19:53 +0200 | 
|---|---|---|
| committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-09-01 18:19:53 +0200 | 
| commit | 1f6e6c800cac0b53aa97d0b3d6cd08e381ed6658 (patch) | |
| tree | 9cb08447183bcdbf06d08533cd32ccd6cd538049 | |
| parent | 96e31aa9820b92d546f36d2e9e6d223706ee3af2 (diff) | |
| download | sbotools2-1f6e6c800cac0b53aa97d0b3d6cd08e381ed6658.tar.xz | |
sboinstall: guard template decoding with eval
| -rwxr-xr-x | sboinstall | 6 | 
1 files changed, 4 insertions, 2 deletions
@@ -102,9 +102,11 @@ if (length $utemp) {  	$non_int = 1;  	my $data = slurp($utemp); -	do { warn "Could not read template from $utemp.\n"; exit _ERR_OPENFH } if not length $data; +	if (length $data) { +		eval { $template = $json->decode($data); }; +	} +	do { warn "Could not read template from $utemp.\n"; exit _ERR_OPENFH } if not defined $template; -	$template = $json->decode($data);  	$build_queue = $template->{build_queue};  } else {  	if ($no_reqs or $non_int) {  | 
