From 9c5377216bc5d7081a6cec44e9b382b2ebbbef55 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 17 Aug 2021 11:20:13 +0000 Subject: [PATCH] calloc for confirm-before data since the item needs to start NULL. --- usr.bin/tmux/cmd-confirm-before.c | 4 ++-- usr.bin/tmux/tty.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/tmux/cmd-confirm-before.c b/usr.bin/tmux/cmd-confirm-before.c index 059f4bfa097..ce051edd697 100644 --- a/usr.bin/tmux/cmd-confirm-before.c +++ b/usr.bin/tmux/cmd-confirm-before.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-confirm-before.c,v 1.45 2021/08/13 06:50:42 nicm Exp $ */ +/* $OpenBSD: cmd-confirm-before.c,v 1.46 2021/08/17 11:20:13 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -72,7 +72,7 @@ cmd_confirm_before_exec(struct cmd *self, struct cmdq_item *item) free(copy); } - cdata = xmalloc(sizeof *cdata); + cdata = xcalloc(1, sizeof *cdata); cdata->cmd = xstrdup(args->argv[0]); cmd_get_source(self, &cdata->pi.file, &cdata->pi.line); diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 1224871e990..8be5aadb8ee 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.402 2021/08/17 08:44:52 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.403 2021/08/17 11:20:13 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -2043,7 +2043,7 @@ tty_cmd_syncstart(struct tty *tty, const struct tty_ctx *ctx) { if (ctx->num == 0x11) { /* - * This is an overlay and a command that moves, the cursor so + * This is an overlay and a command that moves the cursor so * start synchronized updates. */ tty_sync_start(tty); -- 2.20.1