Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix params overflow, UTF-8 and ruby includes #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

andi8086
Copy link

@andi8086 andi8086 commented Mar 5, 2024

Here I tried to include fixes for

  • The open issue with buffer overflow
  • Missing UTF-8 support
  • non-working ruby includes

Please note that especially the buffer check might change the original intention of the code to explicitely
behave as the original hardware state machine. I have no way of checking what the original hardware does.
Also, original hardware did not support UTF-8, however in modern terminal emulators, UTF-8 is a must.

I understand that the original author might not want to include these changes because of that. But everybody
else, feel free to do so :)

kr

Andreas J. Reichel and others added 3 commits March 5, 2024 10:30
Signed-off-by: Andreas J. Reichel <webmaster@6th-dimension.com>
As described by `astoeckel`, if feeding

```
echo -en "\e["`printf '99;%.0s' {0..15}`m | ./test
```

parameters land behind the cb->params array,
which is not a sever issue since the `num_params` element
behind the buffer gets reset afterwards. However, he
suggested that this undefined behavior should be fixed.

I implemented his suggestion in this commit.

Signed-off-by: Andreas J. Reichel <webmaster@6th-dimension.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants