]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_getparam: error if --next is used without a prior URL
authorDaniel Stenberg <daniel@haxx.se>
Thu, 16 Mar 2023 22:59:30 +0000 (23:59 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 17 Mar 2023 13:07:10 +0000 (14:07 +0100)
Reported-by: 積丹尼 Dan Jacobson
Ref: https://github.com/curl/curl/pull/10769#discussion_r1137895629

Closes #10782

src/tool_getparam.c

index 17a6f5567d300662234e8caee3c36d5ecee488f8..6d6cac3dbd0443f09457a1001571d6c6945c7476 100644 (file)
@@ -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 */