projects
/
curl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59a0fb2
)
tool_getparam: fix potentially uninitialized err
author
Jay Satiro
<raysatiro@yahoo.com>
Sun, 9 Jul 2017 16:04:42 +0000
(12:04 -0400)
committer
Jay Satiro
<raysatiro@yahoo.com>
Sun, 9 Jul 2017 16:04:42 +0000
(12:04 -0400)
src/tool_getparam.c
patch
|
blob
|
history
diff --git
a/src/tool_getparam.c
b/src/tool_getparam.c
index 64a84af99f19e68a09cf0edab2b68655cb13535e..cc2d816f150c2cafa2fd13da536041655b876b3d 100644
(file)
--- 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");