Skip to content

Conversation

programmarchy
Copy link
Contributor

Ran into a crash when trying to call .close() on a serial port. Turned out on osx the address buffer size was only 16 bytes, but addresses are 18 bytes e.g "00-04-3e-31-5b-58".

Extended buffer to fit address string and used strncpy to be a little safer.

eelcocramer added a commit that referenced this pull request Apr 5, 2014
Fix buffer overflow on close() in mac osx.
@eelcocramer eelcocramer merged commit aa12ae0 into eelcocramer:master Apr 5, 2014
@eelcocramer eelcocramer added the bug label Apr 5, 2014
@programmarchy programmarchy deleted the address-overflow branch May 24, 2014 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants