Agamnentzar / bluetooth-serial-port

multi-platform bluetooth serial port library for C++
Other
89 stars 27 forks source link

Bugfix/mac crash #12

Closed TobiSchluter closed 4 years ago

TobiSchluter commented 4 years ago

This was hard to debug, because I couldn't run valgrind: the pipe is configured to use 4 byte elements. But since size are expected as number of elements and we are using bytes, this leads to reading random memory when filling the pipe. Likewise target buffers will overflow randomly.

The fix is trivial.

Agamnentzar commented 4 years ago

It's not my code and I'm not familiar with Objective-C, so I'll trust you on this one too :)