diff options
author | 2019-06-13 21:24:09 +0000 | |
---|---|---|
committer | 2019-06-13 21:24:09 +0000 | |
commit | 77d2abb04e7b43761fa4ff87ebf1fcfde9627bee (patch) | |
tree | e6f6522cad96e180c2ca21461a4bd51129181c90 | |
parent | Use PWAIT instead of PUSER in exit1(). (diff) | |
download | wireguard-openbsd-77d2abb04e7b43761fa4ff87ebf1fcfde9627bee.tar.xz wireguard-openbsd-77d2abb04e7b43761fa4ff87ebf1fcfde9627bee.zip |
Do not crash if the environment variable is present but empty.
-rw-r--r-- | usr.bin/tmux/format.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 9b3b4bb7a12..9eedad57df4 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.202 2019/06/13 19:46:00 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.203 2019/06/13 21:24:09 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1097,7 +1097,7 @@ format_find(struct format_tree *ft, const char *key, int modifiers) envent = environ_find(ft->s->environ, key); if (envent == NULL) envent = environ_find(global_environ, key); - if (envent != NULL) { + if (envent != NULL && envent->value != NULL) { found = xstrdup(envent->value); goto found; } |