*/
static const char *cf_expand_variables(const char *cf, int *lineno,
CONF_SECTION *outercs,
- char *output, const char *input)
+ char *output, size_t outsize,
+ const char *input)
{
char *p;
const char *end, *ptr;
*/
value = cf_expand_variables("<internal>",
&lineno,
- cs, buffer, value);
+ cs, buffer, sizeof(buffer),
+ value);
if (!value) {
cf_log_err(cf_sectiontoitem(cs),"Failed expanding variable %s", name);
return -1;
*/
value = cf_expand_variables("?",
&lineno,
- cs, buffer, value);
+ cs, buffer, sizeof(buffer),
+ value);
if (!value) return -1;
}
if (buf2[0] == '$') relative = 0;
- value = cf_expand_variables(filename, lineno, this, buf, buf2);
+ value = cf_expand_variables(filename, lineno, this, buf, sizeof(buf), buf2);
if (!value) return -1;
if (!FR_DIR_IS_RELATIVE(value)) relative = 0;
if ((t3 == T_BARE_WORD) ||
(t3 == T_DOUBLE_QUOTED_STRING)) {
value = cf_expand_variables(filename, lineno, this,
- buf, buf3);
+ buf, sizeof(buf), buf3);
if (!value) return -1;
} else if ((t3 == T_EOL) ||
(t3 == T_HASH)) {