aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cg-base.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cg-base.c b/src/cg-base.c
index a8c7f71..d9da32a 100644
--- a/src/cg-base.c
+++ b/src/cg-base.c
@@ -653,7 +653,13 @@ int main(int argc, char* argv[])
return 0;
}
else if (prio != NULL)
- priority = (int64_t)atoll(prio);
+ {
+ char *end;
+ errno = 0;
+ priority = (int64_t)strtoll(prio, &end, 10);
+ if (errno || *end)
+ usage();
+ }
if (!nulstrcmp(rule, "??"))
{