mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:33:33 +03:00
tool_getparam: handle non-existing (out of range) short-options
... correctly, even when they follow an existing one without a space in
between.
Verify with test 467
Follow-up to 07dd60c05b
Reported-by: Geeknik Labs
Fixes #13101
Closes #13102
This commit is contained in:
parent
4e4e8af1f6
commit
3ccce37790
3 changed files with 34 additions and 2 deletions
|
|
@ -1009,7 +1009,8 @@ static const struct LongShort *single(char letter)
|
|||
{
|
||||
static const struct LongShort *singles[128 - ' ']; /* ASCII => pointer */
|
||||
static bool singles_done = FALSE;
|
||||
DEBUGASSERT((letter < 127) && (letter > ' '));
|
||||
if((letter >= 127) || (letter <= ' '))
|
||||
return NULL;
|
||||
|
||||
if(!singles_done) {
|
||||
unsigned int j;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue