From f81bc88f6c0f5e56c5dacebf768ca110b23ff197 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 17 Jan 2022 10:40:03 +0000 Subject: [PATCH] Do not try to strdup NULL, from seL4 at disroot dot org in GitHub issue 3038. --- usr.bin/tmux/popup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/popup.c b/usr.bin/tmux/popup.c index f1e6cba5fdf..07f57ab8d61 100644 --- a/usr.bin/tmux/popup.c +++ b/usr.bin/tmux/popup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: popup.c,v 1.42 2021/10/25 09:38:36 nicm Exp $ */ +/* $OpenBSD: popup.c,v 1.43 2022/01/17 10:40:03 nicm Exp $ */ /* * Copyright (c) 2020 Nicholas Marriott @@ -668,7 +668,8 @@ popup_display(int flags, enum box_lines lines, struct cmdq_item *item, u_int px, pd = xcalloc(1, sizeof *pd); pd->item = item; pd->flags = flags; - pd->title = xstrdup(title); + if (title != NULL) + pd->title = xstrdup(title); pd->c = c; pd->c->references++; -- 2.20.1