/* fill in the outfile */
if('o' == letter) {
+ if(!*nextarg) {
+ warnf(global, "output file name has no length\n");
+ return PARAM_BAD_USE;
+ }
GetStr(&url->outfile, nextarg);
url->flags &= ~GETOUT_USEREMOTE; /* switch off */
}
warnf(global, "bad output glob!\n");
break;
}
+ if(!*per->outfile) {
+ warnf(global, "output glob produces empty string!\n");
+ result = CURLE_WRITE_ERROR;
+ break;
+ }
}
if(config->output_dir && *config->output_dir) {
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
return CURLE_OUT_OF_MEMORY;
}
+ if(curlx_dyn_addn(&dyn, "", 0))
+ return CURLE_OUT_OF_MEMORY;
+
#if defined(MSDOS) || defined(WIN32)
{
char *sanitized;