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

swri_serial_util segfaults on error #406

Closed
evenator opened this issue Jan 19, 2017 · 0 comments
Closed

swri_serial_util segfaults on error #406

evenator opened this issue Jan 19, 2017 · 0 comments
Labels

Comments

@evenator
Copy link
Contributor

Line 307 of swri_serial_util/src/serial_port.cpp gets the number of available bytes using iotctl( .. ). On failure, this outputs -1 bytes to read. This is subsequently static cast to size_t, yielding 18446744071897977696 bytes to read. The program then tries to allocate that many bytes on line 312 and runs out of memory.

@evenator evenator added the bug label Jan 19, 2017
evenator added a commit that referenced this issue Jan 19, 2017
evenator added a commit that referenced this issue Jan 19, 2017
evenator added a commit to evenator/marti_common that referenced this issue Jan 20, 2017
evenator added a commit to evenator/marti_common that referenced this issue Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant