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 strlen buffer overrun #334

Merged
merged 3 commits into from
Oct 1, 2023
Merged

Conversation

a1akris
Copy link
Contributor

@a1akris a1akris commented Sep 18, 2023

Basically the syntax to declare a flexible array member like this char* regd_name[0] has become so obsolete that it's treated as a zero sized string regardless of its contents, therefore __fortify_stlren was crashing while trying to read the first byte.

This also reverts #332 as it's not needed anymore.

@a1akris a1akris mentioned this pull request Sep 18, 2023
@Desour
Copy link

Desour commented Sep 19, 2023

Tested. Works, this fixes the crash at shutdown with the blinking caps lock.

The linux kernel uses gnu C11 since 5.18 (see https://www.kernel.org/doc/html/v5.18/process/programming-language.html) (gnu C90 before).
ISO C99 flexible array members should be available at least since then. So you could lower the kernel version in the #ifs.

@Spixmaster
Copy link

@tomaspinho Since we have two external tests by @Desour and @dexter2000 which prove the functionality, could you merge this pull request?

@leandrocunha526
Copy link

Issue #335 it was resolved with this.

@tomaspinho
Copy link
Owner

Thanks for fixing the root cause!

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.

5 participants