diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-10-28 09:08:00 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-10-28 09:08:00 +0000 |
commit | 9a98b01db426890cb292130432a39d424ac9b7a2 (patch) | |
tree | de72876c0530258f5d6800b56c29b95f7e883853 /usr.bin | |
parent | 1874588641f3ee10c1021479274a36173a833a42 (diff) |
Start with empty rather than NULL window name to avoid NULL printf if
window_name is evaluated early. Reported by Mikolaj Kucharski.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/window.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index f124f6396cb..d35a5a486df 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.243 2019/09/10 19:35:34 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.244 2019/10/28 09:07:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -313,7 +313,7 @@ window_create(u_int sx, u_int sy) struct window *w; w = xcalloc(1, sizeof *w); - w->name = NULL; + w->name = xstrdup(""); w->flags = 0; TAILQ_INIT(&w->panes); |