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

crash in enumerateDevices() #1

Open
J-d-H opened this issue May 7, 2012 · 0 comments
Open

crash in enumerateDevices() #1

J-d-H opened this issue May 7, 2012 · 0 comments

Comments

@J-d-H
Copy link

J-d-H commented May 7, 2012

There is a bug in enumerateDevices() on line 216 in serial.cpp.
If the System does not have serial ports str is still "" from the begining of the function and free(str) fails.

You can probably fix it with

if (strlen(str) > 0) str[strlen(str)-1] = '\0';
else return alloc_null();

value ret = alloc_string(str);
free(str);
return ret;
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