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
This commit is contained in:
parent
4f6b8a07a3
commit
8689463ae0
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ decode_options (argc, argv)
|
|||
{
|
||||
alternate_editor = getenv ("ALTERNATE_EDITOR");
|
||||
display = getenv ("DISPLAY");
|
||||
if (strlen (display) == 0)
|
||||
if (display && strlen (display) == 0)
|
||||
display = NULL;
|
||||
|
||||
if (display)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue