summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-03-16 23:59:30 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-03-17 14:07:10 +0100
commite2452cf60e53df3a1f41959914968a9afca02bab (patch)
tree5a9d0fd39695d5ba47f08b5e7f6fcd83d20ea120 /src
parentf7a3fae4cb2af0f3b917eb6ccacb372a67ce8781 (diff)
downloadcurl-e2452cf60e53df3a1f41959914968a9afca02bab.tar.gz
tool_getparam: error if --next is used without a prior URL
Reported-by: 積丹尼 Dan Jacobson Ref: https://github.com/curl/curl/pull/10769#discussion_r1137895629 Closes #10782
Diffstat (limited to 'src')
-rw-r--r--src/tool_getparam.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 17a6f5567..6d6cac3db 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -2526,6 +2526,10 @@ ParameterError parse_args(struct GlobalConfig *global, int argc,
else
result = PARAM_NO_MEM;
}
+ else {
+ errorf(global, "missing URL before --next\n");
+ result = PARAM_BAD_USE;
+ }
}
else if(!result && passarg)
i++; /* we're supposed to skip this */