curl: fix --local-port integer overflow

The tool's local port command line range parser didn't check for integer
overflows and could pass "weird" data to libcurl for this option.
libcurl however, has a strict range check for the values so it rejects
anything outside of the accepted range.

Reported-by: Brian Carpenter
Closes #3242
This commit is contained in:
Daniel Stenberg 2018-11-05 11:57:29 +01:00
parent bda4ef417a
commit 52db54869e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 27 additions and 15 deletions

View file

@ -69,8 +69,8 @@ struct OperationConfig {
char *headerfile;
char *ftpport;
char *iface;
int localport;
int localportrange;
long localport;
long localportrange;
unsigned short porttouse;
char *range;
long low_speed_limit;