curl: detect and bail out early on parameter integer overflows

Make the number parser aware of the maximum limit curl accepts for a
value and return an error immediately if larger, instead of running an
integer overflow later.

Fixes #1730
Closes #1736
This commit is contained in:
Daniel Stenberg 2017-08-06 20:10:40 +02:00
parent 453e7a7a03
commit 5c7455fe76
5 changed files with 36 additions and 14 deletions

View file

@ -41,6 +41,7 @@ typedef enum {
PARAM_NO_MEM,
PARAM_NEXT_OPERATION,
PARAM_NO_PREFIX,
PARAM_NUMBER_TOO_LARGE,
PARAM_LAST
} ParameterError;