artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd6d8a5
)
Check fdopen return value, from Christian Menges.
author
nicm
<nicm@openbsd.org>
Wed, 21 Jun 2023 06:28:18 +0000
(06:28 +0000)
committer
nicm
<nicm@openbsd.org>
Wed, 21 Jun 2023 06:28:18 +0000
(06:28 +0000)
usr.bin/tmux/popup.c
patch
|
blob
|
history
diff --git
a/usr.bin/tmux/popup.c
b/usr.bin/tmux/popup.c
index
cafbc16
..
b172f40
100644
(file)
--- a/
usr.bin/tmux/popup.c
+++ b/
usr.bin/tmux/popup.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: popup.c,v 1.
49 2023/06/08 11:17:2
8 nicm Exp $ */
+/* $OpenBSD: popup.c,v 1.
50 2023/06/21 06:28:1
8 nicm Exp $ */
/*
* Copyright (c) 2020 Nicholas Marriott <nicholas.marriott@gmail.com>
@@
-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);