mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08:00
tool_getparam: do not try to expand without an argument
This would lead to a segfault. Fixes #12565 Reported-by: Geeknik Labs Closes #12575
This commit is contained in:
parent
000c738140
commit
d187f51948
@ -822,7 +822,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
|
||||
err = PARAM_NO_NOT_BOOLEAN;
|
||||
goto error;
|
||||
}
|
||||
else if(expand) {
|
||||
else if(expand && nextarg) {
|
||||
struct curlx_dynbuf nbuf;
|
||||
bool replaced;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user