summaryrefslogtreecommitdiff
path: root/src/tool_getparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r--src/tool_getparam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index cc3fcf3a5..e42a894cb 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -1706,7 +1706,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
warnf(global, "Failed to open %s!\n", &nextarg[1]);
else {
err = file2memory(&string, &len, file);
- if(!err) {
+ if(!err && string) {
/* Allow strtok() here since this isn't used threaded */
/* !checksrc! disable BANNEDFUNC 2 */
char *h = strtok(string, "\r\n");