1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-29 17:31:02 +01:00

40453: signal handler safety for callers of patcompile(PAT_STATIC), which is not re-entrant.

This commit is contained in:
Barton E. Schaefer 2017-01-29 08:30:14 -08:00
parent 0672c75359
commit e51c9c17af
13 changed files with 126 additions and 42 deletions

View file

@ -647,7 +647,7 @@ bin_setopt(char *nam, char **args, UNUSED(Options ops), int isun)
/* Expand the current arg. */
tokenize(s);
if (!(pprog = patcompile(s, PAT_STATIC, NULL))) {
if (!(pprog = patcompile(s, PAT_HEAPDUP, NULL))) {
zwarnnam(nam, "bad pattern: %s", *args);
continue;
}