mirror of
https://github.com/tmux/tmux.git
synced 2024-11-17 18:08:51 +00:00
Check fdopen return value, from Christian Menges.
This commit is contained in:
parent
bdd05bdbd3
commit
645bf8b3ab
2
popup.c
2
popup.c
@ -788,6 +788,8 @@ popup_editor(struct client *c, const char *buf, size_t len,
|
|||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
f = fdopen(fd, "w");
|
f = fdopen(fd, "w");
|
||||||
|
if (f == NULL)
|
||||||
|
return (-1);
|
||||||
if (fwrite(buf, len, 1, f) != 1) {
|
if (fwrite(buf, len, 1, f) != 1) {
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return (-1);
|
return (-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user