]> granicus.if.org Git - curl/commitdiff
curl: --local-port fix followup
authorDaniel Stenberg <daniel@haxx.se>
Wed, 7 Nov 2018 22:26:55 +0000 (23:26 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 8 Nov 2018 12:59:16 +0000 (13:59 +0100)
Regression by 52db54869e6.

Reported-by: infinnovation-dev on github
Fixes #3248
Closes #3249

src/tool_getparam.c

index 663c4dd4de1dc8437eb9d9825cc5d4d3c2da6e1c..5dc4141faddbfab443e216b5c8dec5e48ab24849 100644 (file)
@@ -943,8 +943,8 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
           p++;
         if(*p) {
           /* if there's anything more than a plain decimal number */
-          *p++ = 0;
           rc = sscanf(p, " - %6s", lrange);
+          *p = 0; /* zero terminate to make str2unum() work below */
         }
         else
           rc = 0;