aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-10-07 19:36:36 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-10-08 00:28:50 +0200
commitf2c8086ff15e6e995e1aef328e630bd0b91c768f (patch)
tree2ddefc30ab060769110371652f18980e8cca10c9
parent38fbe8dbfe796745e3d98ee72d0e5c30cb1b2be3 (diff)
downloadcurl-f2c8086ff15e6e995e1aef328e630bd0b91c768f.tar.gz
tool_getparam: accept variable expansion on file names too
Reported-by: PBudmark on github Fixes #12048 Closes #12055
-rw-r--r--src/tool_getparam.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index cd9ce7b5a..d9772a309 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -826,8 +826,9 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
struct curlx_dynbuf nbuf;
bool replaced;
- if(aliases[hit].desc != ARG_STRING) {
- /* --expand on an option that isn't a string */
+ if((aliases[hit].desc != ARG_STRING) &&
+ (aliases[hit].desc != ARG_FILENAME)) {
+ /* --expand on an option that isn't a string or a filename */
err = PARAM_EXPAND_ERROR;
goto error;
}