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

Segfault at if '\<letter>' entered inside string & if compiled with musl-gcc (a proposed fix is also included) #94

Open
nglibc opened this issue Feb 14, 2024 · 0 comments

Comments

@nglibc
Copy link

nglibc commented Feb 14, 2024

if kilo is compiled with the musl gcc wrapper, the following will trigger a segfault

> kilo new_file.c

then enter on first line:

puts("\e

This will trigger a segfault in musl (but not glibc)

The following will fix the problem - change line 445 from:

if (*p == '\\') {

To:

if (*p == '\\' && *(p+1)) {

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

No branches or pull requests

1 participant