aboutsummaryrefslogtreecommitdiff
path: root/dcs.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-03-19 19:23:41 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-03-21 19:40:51 +0000
commitde5226c93007c588f28a12215796c462a05e5bdf (patch)
tree9998ff3062dc77857ccc2d852f763ec6a945d00b /dcs.c
parentdcs: xtgettcap: use custom put() handler (diff)
dcs: don’t automatically buffer anything
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
Diffstat (limited to 'dcs.c')
-rw-r--r--dcs.c5
1 files changed, 0 insertions, 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