From de5226c93007c588f28a12215796c462a05e5bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 19 Mar 2022 20:23:41 +0100 Subject: [PATCH] =?UTF-8?q?dcs:=20don=E2=80=99t=20automatically=20buffer?= =?UTF-8?q?=20anything?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a request handler doesn’t define its own put() handler, simply drop all DCS parameter data. This way, we won’t end up allocating potentially large buffers for unsupported/unimplemented DCS requests. Closes #959 --- dcs.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dcs.c b/dcs.c index c1bab202..06ad60a9 100644 --- a/dcs.c +++ b/dcs.c @@ -475,11 +475,6 @@ dcs_put(struct terminal *term, uint8_t c) if (term->vt.dcs.put_handler != NULL) term->vt.dcs.put_handler(term, c); - else { - if (!ensure_size(term, term->vt.dcs.idx + 1)) - return; - term->vt.dcs.data[term->vt.dcs.idx++] = c; - } } void