-/* $OpenBSD: cmd-resize-window.c,v 1.9 2021/08/27 17:15:57 nicm Exp $ */
+/* $OpenBSD: cmd-resize-window.c,v 1.10 2023/06/30 13:19:32 nicm Exp $ */
/*
* Copyright (c) 2018 Nicholas Marriott <nicholas.marriott@gmail.com>
struct session *s = target->s;
const char *errstr;
char *cause;
- u_int adjust, sx, sy;
- int xpixel = -1, ypixel = -1;
+ u_int adjust, sx, sy, xpixel = 0, ypixel = 0;
if (args_count(args) == 0)
adjust = 1;
-/* $OpenBSD: format.c,v 1.313 2023/05/19 07:46:34 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.314 2023/06/30 13:19:32 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
argc = 0;
/* Single argument with no wrapper character. */
- if (!ispunct(cp[1]) || cp[1] == '-') {
+ if (!ispunct((u_char)cp[1]) || cp[1] == '-') {
end = format_skip(cp + 1, ":;");
if (end == NULL)
break;
-/* $OpenBSD: hyperlinks.c,v 1.2 2022/07/06 07:36:36 nicm Exp $ */
+/* $OpenBSD: hyperlinks.c,v 1.3 2023/06/30 13:19:32 nicm Exp $ */
/*
* Copyright (c) 2021 Will <author@will.party>
#define MAX_HYPERLINKS 5000
-static uint64_t hyperlinks_next_external_id = 1;
+static long long hyperlinks_next_external_id = 1;
static u_int global_hyperlinks_count;
struct hyperlinks_uri {
-/* $OpenBSD: input.c,v 1.215 2023/06/25 15:53:07 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.216 2023/06/30 13:19:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
const char *end)
{
char *out = NULL;
- size_t outlen = 0;
+ int outlen = 0;
if (buf != NULL && len != 0) {
+ if (len >= ((size_t)INT_MAX * 3 / 4) - 1)
+ return;
outlen = 4 * ((len + 2) / 3) + 1;
out = xmalloc(outlen);
if ((outlen = b64_ntop(buf, len, out, outlen)) == -1) {
-/* $OpenBSD: notify.c,v 1.43 2022/10/28 13:00:02 nicm Exp $ */
+/* $OpenBSD: notify.c,v 1.44 2023/06/30 13:19:32 nicm Exp $ */
/*
* Copyright (c) 2012 George Nachman <tmux@georgester.com>
ne->client = c;
ne->session = s;
ne->window = w;
- ne->pane = (wp != NULL ? wp->id : -1);
+ ne->pane = (wp != NULL ? (int)wp->id : -1);
ne->pbname = (pbname != NULL ? xstrdup(pbname) : NULL);
ne->formats = format_create(NULL, NULL, 0, FORMAT_NOJOBS);
ne.client = cmdq_get_client(item);
ne.session = target->s;
ne.window = target->w;
- ne.pane = (target->wp != NULL ? target->wp->id : -1);
+ ne.pane = (target->wp != NULL ? (int)target->wp->id : -1);
ne.formats = format_create(NULL, NULL, 0, FORMAT_NOJOBS);
format_add(ne.formats, "hook", "%s", name);
-/* $OpenBSD: tty-keys.c,v 1.166 2023/04/17 17:57:35 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.167 2023/06/30 13:19:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
{
struct client *c = tty->client;
struct window_pane *wp;
- size_t end, terminator, needed;
+ size_t end, terminator = 0, needed;
char *copy, *out;
int outlen;
u_int i;
-/* $OpenBSD: tty-term.c,v 1.98 2023/04/28 05:59:35 nicm Exp $ */
+/* $OpenBSD: tty-term.c,v 1.99 2023/06/30 13:19:32 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
s = tmp;
break;
case TTYCODE_FLAG:
- n = tigetflag((char *) ent->name);
+ n = tigetflag((char *)ent->name);
if (n == -1)
continue;
if (n)
else
s = "0";
break;
+ default:
+ fatalx("unknown capability type");
}
*caps = xreallocarray(*caps, (*ncaps) + 1, sizeof **caps);
xasprintf(&(*caps)[*ncaps], "%s=%s", ent->name, s);