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

Undefined behaviour in text.c #18

Open
poldy opened this issue Jun 13, 2021 · 0 comments
Open

Undefined behaviour in text.c #18

poldy opened this issue Jun 13, 2021 · 0 comments

Comments

@poldy
Copy link

poldy commented Jun 13, 2021

This is just a small issue. When I used the "-fsanitize=undefined" option to clang, it complained that performing arithmetic on a NULL pointer is undefined behaviour at L49 of text.c. The problem is that current->avail is NULL at initialisation time, so the addition is undefined (nasal daemons, etc. :-) ). This patch fixes the warning.

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