artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5a147a
)
The format callback may not always succeed, so we need to check for
author
nicm
<nicm@openbsd.org>
Tue, 27 Oct 2015 09:18:06 +0000
(09:18 +0000)
committer
nicm
<nicm@openbsd.org>
Tue, 27 Oct 2015 09:18:06 +0000
(09:18 +0000)
NULL. From Patrick Palka.
usr.bin/tmux/format.c
patch
|
blob
|
history
diff --git
a/usr.bin/tmux/format.c
b/usr.bin/tmux/format.c
index
2a65422
..
f449651
100644
(file)
--- a/
usr.bin/tmux/format.c
+++ b/
usr.bin/tmux/format.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: format.c,v 1.8
7 2015/10/25 22:29:17
nicm Exp $ */
+/* $OpenBSD: format.c,v 1.8
8 2015/10/27 09:18:06
nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
@@
-643,6
+643,8
@@
format_find(struct format_tree *ft, const char *key, int modifiers)
return (NULL);
found:
+ if (found == NULL)
+ return (NULL);
copy = xstrdup(found);
if (modifiers & FORMAT_BASENAME) {
saved = copy;