# HG changeset patch # User Karoly Lorentey # Date 1077321293 0 # Node ID 011894b9950aa33f3633a665073baceaec7e1aa1 # Parent bd36a0907b8d1873ef9e356d655b6b74152b267c 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 diff -r bd36a0907b8d -r 011894b9950a lib-src/emacsclient.c --- a/lib-src/emacsclient.c Fri Feb 20 17:53:00 2004 +0000 +++ b/lib-src/emacsclient.c Fri Feb 20 23:54:53 2004 +0000 @@ -112,7 +112,7 @@ { alternate_editor = getenv ("ALTERNATE_EDITOR"); display = getenv ("DISPLAY"); - if (strlen (display) == 0) + if (display && strlen (display) == 0) display = NULL; if (display)