diff options
author | nicm <nicm> | 2023-06-21 06:28:18 +0000 |
---|---|---|
committer | nicm <nicm> | 2023-06-21 06:28:18 +0000 |
commit | 645bf8b3ab9606bff1d94842ea14556c9f1d620a (patch) | |
tree | 35753c50dfd984b2822c781f5bd7c3b6aa637ddb /popup.c | |
parent | bdd05bdbd3ee204d4bc7f4fad5a0bedc4ab6c254 (diff) |
Check fdopen return value, from Christian Menges.
Diffstat (limited to 'popup.c')
-rw-r--r-- | popup.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -788,6 +788,8 @@ popup_editor(struct client *c, const char *buf, size_t len, if (fd == -1) return (-1); f = fdopen(fd, "w"); + if (f == NULL) + return (-1); if (fwrite(buf, len, 1, f) != 1) { fclose(f); return (-1); |