aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiva Sivaraman <kasivara@microsoft.com>2020-05-18 08:59:58 -0700
committerDaniel Stenberg <daniel@haxx.se>2020-05-19 08:55:27 +0200
commitc5f0a9db22e7bfd27cb71ecc5e918682ed3ed663 (patch)
tree248709dc86cc6c32ab21eb02d35717333bbb95af
parentc4df1f75ad6a90c70dc96e7b183be066465014ec (diff)
tool_paramhlp: fixed potentially uninitialized strtol() variable
Seems highly unlikely to actually be possible, but better safe than sorry. Closes #5417
-rw-r--r--src/tool_paramhlp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 67702ebe2..1fe364075 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -181,6 +181,7 @@ ParameterError str2num(long *val, const char *str)
{
if(str) {
char *endptr;
+ endptr = (void*)0;
long num;
errno = 0;
num = strtol(str, &endptr, 10);