From 1a25e2a3f14fce0c9c13ce26bab85e2cca170133 Mon Sep 17 00:00:00 2001 From: df Date: Tue, 30 Jun 2020 03:33:38 +0000 Subject: [PATCH] Fix potential format error with queue item containing % If an item is in the queue whose file name contains a %, the following error occurs, causing the item never to be dequeued: ```in procedure '::auto::dumpq' called at file "/mod/webif/lib/auto/deq", line 167 at file "/mod/webif/lib/auto/deq", line 118 /mod/webif/lib/auto/deq:118: Error: not enough arguments for all format specifiers``` The file name needs to be passed to `format` as a parameter with format `%s` rather than embedding it in the format string, or else ```log "[format ...][$q get file]"``` --- webif/lib/auto/deq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webif/lib/auto/deq b/webif/lib/auto/deq index 435478a..41eec9a 100755 --- a/webif/lib/auto/deq +++ b/webif/lib/auto/deq @@ -115,8 +115,8 @@ proc ::auto::dumpq {qq} { if {[$q get action] in $::auto::plugins} { set pri $::auto::plugins([$q get action]) } - log [format " C: %4d %5d %8s - [$q get file]" \ - [$q get id] $pri [$q get action]] 2 + log [format " C: %4d %5d %8s - %s" \ + [$q get id] $pri [$q get action] [$q get file]] 2 } }