]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_paramhlp: fixed potentially uninitialized strtol() variable
authorSiva Sivaraman <kasivara@microsoft.com>
Mon, 18 May 2020 15:59:58 +0000 (08:59 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 19 May 2020 06:55:27 +0000 (08:55 +0200)
Seems highly unlikely to actually be possible, but better safe than
sorry.

Closes #5417

src/tool_paramhlp.c

index 67702ebe2eb259c1846c5fb069c758451c844344..1fe364075740d020c196ec5f353128401f049733 100644 (file)
@@ -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);