diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2015-06-27 12:50:40 -0700 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-06-27 12:50:40 -0700 |
| commit | ef080283468cbd7b46ceb19c148cd0b9c4d52356 (patch) | |
| tree | 3ef8cfac6e48b86bc6f27fbf5d16dba382121738 /Src/exec.c | |
| parent | Don't require MULTI_FUNCDEF in _main_complete. (diff) | |
| download | zsh-ef080283468cbd7b46ceb19c148cd0b9c4d52356.tar zsh-ef080283468cbd7b46ceb19c148cd0b9c4d52356.tar.gz zsh-ef080283468cbd7b46ceb19c148cd0b9c4d52356.tar.bz2 zsh-ef080283468cbd7b46ceb19c148cd0b9c4d52356.tar.lz zsh-ef080283468cbd7b46ceb19c148cd0b9c4d52356.tar.xz zsh-ef080283468cbd7b46ceb19c148cd0b9c4d52356.tar.zst zsh-ef080283468cbd7b46ceb19c148cd0b9c4d52356.zip | |
35634: handle failure of gettempname() in namedpipe()
Diffstat (limited to 'Src/exec.c')
| -rw-r--r-- | Src/exec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c index 50a11eb54..39d132647 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -4277,6 +4277,10 @@ namedpipe(void) { char *tnam = gettempname(NULL, 1); + if (!tnam) { + zerr("failed to create named pipe: %e", errno); + return NULL; + } # ifdef HAVE_MKFIFO if (mkfifo(tnam, 0600) < 0){ # else |
