fix a regression in expandlabel() returning it string argument without making a copy

This commit is contained in:
stefan schippers 2023-10-06 00:08:16 +02:00
parent c4e1fb6a31
commit 42781f8456
1 changed files with 2 additions and 1 deletions

View File

@ -101,7 +101,8 @@ const char *expandlabel(const char *s, int *m)
if(parselabel_debug >= 3) fprintf(errfp, "expandlabel(): entering\n");
if(!strpbrk(s, "*,.:")) { /* shortcut: nothing to parse / expand */
*m = 1;
return s;
my_strdup(_ALLOC_ID_, &dest_string.str, s);
return dest_string.str;
}
buf=yy_scan_string(s);
yyparse();