From: Kern Sibbald Date: Wed, 2 Apr 2014 14:38:18 +0000 (+0200) Subject: Fix improper string in parser X-Git-Tag: Release-7.0.2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0bcca77195c5321a977cfd39ebb63e2dfa42453f;p=bacula%2Fbacula Fix improper string in parser --- diff --git a/bacula/src/lib/parse_conf.c b/bacula/src/lib/parse_conf.c index ced418c02e..493a34fa84 100644 --- a/bacula/src/lib/parse_conf.c +++ b/bacula/src/lib/parse_conf.c @@ -417,7 +417,7 @@ void store_dir(LEX *lc, RES_ITEM *item, int index, int pass) lex_get_token(lc, T_STRING); if (pass == 1) { if (lc->str[0] != '|') { - do_shell_expansion(lc->str, sizeof(lc->str)); + do_shell_expansion(lc->str, sizeof_pool_memory(lc->str)); } *(item->value) = bstrdup(lc->str); } @@ -900,7 +900,7 @@ bool CONFIG::parse_config() lex_set_default_error_handler(lc); } lex_set_error_handler_error_type(lc, err_type) ; - bstrncpy(lc->str, cf, sizeof(lc->str)); + bstrncpy(lc->str, cf, sizeof_pool_memory(lc->str)); lc->fname = lc->str; scan_err2(lc, _("Cannot open config file \"%s\": %s\n"), lc->str, be.bstrerror());