TheThingsNetwork / arduino-device-lib

Arduino Library for TTN Devices
MIT License
208 stars 96 forks source link

Dangling pointer in TheThingsMessage #257

Open paulbendixen opened 5 years ago

paulbendixen commented 5 years ago

When calling TheThingsMessage::encodeDeviceData, the buffer pointer pointer gets set to a temporary array on the stack, this might happen to work in most cases, but if anything is called between encoding and sending, this might break horribly and is at least undefined behaviour.

johanstokking commented 5 years ago

Thanks for pointing out. Can you file a PR?