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
This commit is contained in:
Daniel Eklöf 2022-03-19 20:23:41 +01:00
parent 67a228bf4b
commit de5226c930
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

5
dcs.c
View file

@ -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