[pve-devel] [PATCH v2 common] Fix #861: use safer sprintf formatting

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Jan 8 12:43:58 CET 2016


---
 src/PVE/INotify.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index 60610ce..6cec84b 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -648,9 +648,9 @@ sub write_active_workers {
 	my $saved = $task->{saved} ? 1 : 0;
 	if ($task->{endtime}) {
 	    if ($task->{status}) {
-		$raw .= sprintf("$upid $saved %08X $task->{status}\n", $task->{endtime});
+		$raw .= sprintf("%s %s %08X %s\n", $upid, $saved, $task->{endtime}, $task->{status});
 	    } else {
-		$raw .= sprintf("$upid $saved %08X\n", $task->{endtime});
+		$raw .= sprintf("%s %s %08X\n", $upid, $saved, $task->{endtime});
 	    }
 	} else {
 	    $raw .= "$upid $saved\n";
-- 
2.1.4





More information about the pve-devel mailing list