thelsing / knx

knx stack (TP, IP and RF) for arduino and linux, Can be configured with ETS
GNU General Public License v3.0
257 stars 91 forks source link

fix: prevent use of uninitialized _savedAsapXXX variables #241

Closed mumpf closed 1 year ago

mumpf commented 1 year ago

This fix prevents a hanging situation in the stack. In rare cases it might happen, that confirm mesages are send before _savedAsapXXX is set. One of these rare cases: this coding is entered, the sendBuffer contains an incorrect telegram and this leads to a send telegram with an ASAP = 0, which does not exist.

This correction improves robustness and has no other side effects as far as I see. I tested it for more than 2 weeks in a productive system with thousands of telegrams.

Please accept this pull request.

thelsing commented 1 year ago

Merged thanks.