From: Jay Satiro Date: Sun, 9 Jul 2017 16:04:42 +0000 (-0400) Subject: tool_getparam: fix potentially uninitialized err X-Git-Tag: curl-7_55_0~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17da6750026cf00277aad3a44fd20b1a4cea6406;p=curl tool_getparam: fix potentially uninitialized err --- diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 64a84af99..cc2d816f1 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -1634,7 +1634,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */ if(!file) warnf(global, "Failed to open %s!\n", &nextarg[1]); else { - if(PARAM_OK == file2memory(&string, &len, file)) { + err = file2memory(&string, &len, file); + if(!err) { /* Allow strtok() here since this isn't used threaded */ /* !checksrc! disable BANNEDFUNC 2 */ char *h = strtok(string, "\r\n");