patch 8.2.1091: no check if opening a pty works
Problem: No check if opening a pty works.
Solution: Check for invalid file descriptor.
diff --git a/src/os_unix.c b/src/os_unix.c
index 095e3a7..a82256c 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5922,6 +5922,8 @@
channel_T *channel;
open_pty(&pty_master_fd, &pty_slave_fd, &job->jv_tty_out, &job->jv_tty_in);
+ if (pty_master_fd < 0 || pty_slave_fd < 0)
+ return FAIL;
close(pty_slave_fd);
channel = add_channel();
diff --git a/src/version.c b/src/version.c
index e4d8694..82eb990 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1091,
+/**/
1090,
/**/
1089,