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/number of interfaces bug #39

Merged
merged 6 commits into from
Jul 10, 2024
Merged

Conversation

RincewindsHat
Copy link
Member

This PR changes the computation of number of interfaces of the devices. Sometimes devices seem to report less interfaces than are really visible and check_interfaces just allocated memory for the reported number.

Execution of check_interfaces was unstable in that case, since some writes then occured beyond the borders of allocated memory.

This could possibly the reason for #4

Lorenz Kästle added 6 commits July 10, 2024 00:40
It seems like detecting the number of interfaces a device has is harder
than one might think.
Apparently those things lie HARD about that.
If you then try to allocate memory for the result based on that,
but try to write MORE results there, you get a segfault sooner or later.

This patch iterates through the answer of the device and just counts
them, so this is hopefully the safe way to do this.
@RincewindsHat RincewindsHat merged commit df6392e into master Jul 10, 2024
2 checks passed
@RincewindsHat RincewindsHat deleted the fix/number_of_interfaces_bug branch July 10, 2024 11:54
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.

1 participant