Skip to content
Snippets Groups Projects
Commit ecfd007f authored by Dominik Bartkiewicz's avatar Dominik Bartkiewicz Committed by Danny Auble
Browse files

Return error when bad separator is given for scontrol update job licenses.

parent 6cf363c4
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,7 @@ documents those changes that are of interest to users and administrators.
destroying a mutex.
-- Fix updating job priority on multiple partitions to be correct.
-- Don't remove admin comment when updating a job.
-- Return error when bad separator is given for scontrol update job licenses.
* Changes in Slurm 17.02.2
==========================
......
......@@ -148,9 +148,12 @@ static List _build_license_list(char *licenses, bool *valid)
if ((token[i] == ':') || (token[i] == '*')) {
token[i++] = '\0';
num = (int32_t)strtol(&token[i], &end_num, 10);
if (*end_num != '\0')
*valid = false;
break;
}
}
if (num < 0) {
if (num < 0 || !(*valid)) {
*valid = false;
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment