summaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorNick Principe <nick@princi.pe>2019-07-01 15:45:21 -0400
committerNick Principe <nick@princi.pe>2019-07-01 16:21:09 -0400
commit07a2919d7a86607d42f5fb69f1f0ba98097d4d98 (patch)
treea65b52eed0e9db52b12394c6aa4596f13c52aafc /init.c
parent971341ad741db8d2ae57d8f9b368d75f6c02c1a9 (diff)
Increase maximum length of line in jobs file to 8192
Increase OPT_LEN_MAX to 8192, use OPT_LEN_MAX for string in __parse_jobs_ini(), and document line length limit for job files in man page. Signed-off-by: Nick Principe nick@princi.pe
Diffstat (limited to 'init.c')
-rw-r--r--init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/init.c b/init.c
index 7383427..f7e7296 100644
--- a/init.c
+++ b/init.c
@@ -1887,7 +1887,7 @@ static int __parse_jobs_ini(struct thread_data *td,
}
}
- string = malloc(4096);
+ string = malloc(OPT_LEN_MAX);
/*
* it's really 256 + small bit, 280 should suffice
@@ -1920,7 +1920,7 @@ static int __parse_jobs_ini(struct thread_data *td,
if (is_buf)
p = strsep(&file, "\n");
else
- p = fgets(string, 4096, f);
+ p = fgets(string, OPT_LEN_MAX, f);
if (!p)
break;
}
@@ -1989,7 +1989,7 @@ static int __parse_jobs_ini(struct thread_data *td,
if (is_buf)
p = strsep(&file, "\n");
else
- p = fgets(string, 4096, f);
+ p = fgets(string, OPT_LEN_MAX, f);
if (!p)
break;
dprint(FD_PARSE, "%s", p);