aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-01 18:44:56 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-01 18:44:56 +0000
commit8c32e3ccf0b7eb5fbb0fc017fdc8719a426bd275 (patch)
tree7ba5a295537287d12e4e6be7241a31caae344148 /render.c
parentcsi: log only the un-handled parameter in a multi-operation CSI (diff)
vt: ensure we never step outside our parameter and sub-parameter arrays
We only support 16 parameters, and for each parameter, 16 sub-parameters. If we ever hit that limit (or rather, if the client writes 17 (sub) parameters), log this and stop incrementing the parameter index variable. For performance reason, we implement the following behavior: * We never increment the parameter index past the supported number. This ensures all code *accessing* the parameter list can do so without verifying the validity of the index. * The *first* time we see too many parameters, and the first time we see too many sub parameters, log this. Then *never* log again. Even if we see too many parameters in a completely different escape. This is so that we don't have to keep a "have warned" boolean in the terminal struct, but can use a simple function local static variable.
Diffstat (limited to 'render.c')
0 files changed, 0 insertions, 0 deletions