From: nicm Date: Fri, 10 Jun 2022 11:55:30 +0000 (+0000) Subject: Ignore OSC if the first argument is not properly terminated. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fdbaf1ceb7d9af1029e66d9af5f4b13ed9b02fd1;p=openbsd Ignore OSC if the first argument is not properly terminated. --- diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c index 202d9e57aa8..add5f4a6524 100644 --- a/usr.bin/tmux/input.c +++ b/usr.bin/tmux/input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: input.c,v 1.203 2022/06/09 09:12:55 nicm Exp $ */ +/* $OpenBSD: input.c,v 1.204 2022/06/10 11:55:30 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -2292,6 +2292,8 @@ input_exit_osc(struct input_ctx *ictx) option = 0; while (*p >= '0' && *p <= '9') option = option * 10 + *p++ - '0'; + if (*p != ';' && *p != '\0') + return; if (*p == ';') p++;