aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorKaroly Lorentey2004-02-20 23:54:53 +0000
committerKaroly Lorentey2004-02-20 23:54:53 +0000
commit8689463ae016c2af2798782ddf6026f88c4848c9 (patch)
treed0d2e9f82e33f1af5b2e3805ec7d3df9e60f9564 /lib-src
parent4f6b8a07a373b909dfb3bee59942893527a113b3 (diff)
downloademacs-8689463ae016c2af2798782ddf6026f88c4848c9.tar.gz
emacs-8689463ae016c2af2798782ddf6026f88c4848c9.zip
Fix a crash in emacsclient when DISPLAY is unset.
lib-src/emacsclient.c (decode_options): Don't call strlen on a null pointer. Reported by Ami Fishman. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-92
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 1ef45481840..f41315b1248 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -112,7 +112,7 @@ decode_options (argc, argv)
112{ 112{
113 alternate_editor = getenv ("ALTERNATE_EDITOR"); 113 alternate_editor = getenv ("ALTERNATE_EDITOR");
114 display = getenv ("DISPLAY"); 114 display = getenv ("DISPLAY");
115 if (strlen (display) == 0) 115 if (display && strlen (display) == 0)
116 display = NULL; 116 display = NULL;
117 117
118 if (display) 118 if (display)