diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2017-05-10 16:43:08 +0200 |
---|---|---|
committer | Amadeusz Sławiński <amade@asmblr.net> | 2017-05-30 22:12:25 +0200 |
commit | 79f755ff5c5c5ffa9b9423200fe36fe108b75cfa (patch) | |
tree | 7796f0ceef17aa1f9ed8a0a3e88d71b7688ccb18 | |
parent | 50b576fbebe29980a594c60cca5c73e038dfd274 (diff) | |
download | screen-79f755ff5c5c5ffa9b9423200fe36fe108b75cfa.tar.gz |
screen: don't stat("")
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
-rw-r--r-- | src/screen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c index eaec5a2..7dc6034 100644 --- a/src/screen.c +++ b/src/screen.c @@ -44,6 +44,7 @@ #endif #include <ctype.h> #include <stdbool.h> +#include <string.h> #include <unistd.h> #include <fcntl.h> @@ -3393,7 +3394,7 @@ void SetTtyname(bool fatal, struct stat *st) } } - if (attach_tty) { + if (attach_tty && strcmp(attach_tty, "")) { if (stat(attach_tty, st)) Panic(errno, "Cannot access '%s'", attach_tty); |