diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-01 18:44:56 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-01 18:44:56 +0000 |
| commit | 8c32e3ccf0b7eb5fbb0fc017fdc8719a426bd275 (patch) | |
| tree | 7ba5a295537287d12e4e6be7241a31caae344148 /render.c | |
| parent | csi: 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
