summaryrefslogtreecommitdiffstats
path: root/daemon/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/debug.c')
-rw-r--r--daemon/debug.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon/debug.c b/daemon/debug.c
index 4036af68..94b84bff 100644
--- a/daemon/debug.c
+++ b/daemon/debug.c
@@ -429,8 +429,12 @@ debug_progress (const char *subcmd, int argc, char *const *const argv)
char *secs_str = argv[0];
unsigned secs;
- if (sscanf (secs_str, "%u", &secs) != 1 || secs == 0)
+ if (sscanf (secs_str, "%u", &secs) != 1)
goto error;
+ if (secs == 0 || secs > 1000000) { /* RHBZ#816839 */
+ reply_with_error ("progress: argument is 0, less than 0, or too large");
+ return NULL;
+ }
unsigned i;
unsigned tsecs = secs * 10; /* 1/10ths of seconds */