Skip to content
Snippets Groups Projects
Commit b583203d authored by Moe Jette's avatar Moe Jette
Browse files
parent 3e371cd2
No related branches found
No related tags found
No related merge requests found
...@@ -291,6 +291,9 @@ static void *get_script_buffer(const char *filename, int *size) ...@@ -291,6 +291,9 @@ static void *get_script_buffer(const char *filename, int *size)
if (script_size == 0) { if (script_size == 0) {
error("Batch script is empty!"); error("Batch script is empty!");
goto fail; goto fail;
} else if (script_size >= 0xffff) {
error("Job script exceeds size supported by slurm");
goto fail;
} else if (xstring_is_whitespace(buf)) { } else if (xstring_is_whitespace(buf)) {
error("Batch script contains only whitespace!"); error("Batch script contains only whitespace!");
goto fail; goto fail;
......
...@@ -856,6 +856,11 @@ _build_script (const char *argv0, char *fname, int file_type) ...@@ -856,6 +856,11 @@ _build_script (const char *argv0, char *fname, int file_type)
_get_options(buffer); _get_options(buffer);
if (strlen(buffer) >= 0xffff) {
error("Job script exceeds size supported by slurm");
xfree(buffer);
}
return buffer; return buffer;
} }
......
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