1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-11 09:40:59 +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

@ -3413,6 +3413,7 @@ build_cur_dump(char *nam, char *dump, char **names, int match, int map,
for (; *names; names++) {
tokenize(pat = dupstring(*names));
/* Signal-safe here, caller queues signals */
if (!(pprog = patcompile(pat, PAT_STATIC, NULL))) {
zwarnnam(nam, "bad pattern: %s", *names);
close(dfd);