free(lf->fname);
free_memory(lf->line);
lf->line = NULL;
+ free_memory(lf->str);
+ lf->str = NULL;
if (of) {
of->options = lf->options; /* preserve options */
memcpy(lf, of, sizeof(LEX));
lf->line = get_memory(5000);
lf->state = lex_none;
lf->ch = L_EOL;
+ lf->str = get_memory(5000);
Dmsg1(dbglvl, "Return lex=%x\n", lf);
return lf;
}
*/
static void add_str(LEX *lf, int ch)
{
- if (lf->str_len >= MAXSTRING-3) {
+ if (lf->str_len >= sizeof_pool_memory(lf->str)) {
Emsg3(M_ERROR_TERM, 0, _(
_("Config token too long, file: %s, line %d, begins at line %d\n")),
lf->fname, lf->line_no, lf->begin_line_no);
char *fname; /* filename */
FILE *fd; /* file descriptor */
POOLMEM *line; /* input line */
- char str[MAXSTRING]; /* string being scanned */
+ POOLMEM *str; /* string being scanned */
int str_len; /* length of string */
int line_no; /* file line number */
int col_no; /* char position on line */