G4lile0 / tinyGS

📡 Open Ground Station Network 🛰
GNU General Public License v3.0
923 stars 177 forks source link

Crash if begine command received with no sat value #134

Open mdkendall opened 2 years ago

mdkendall commented 2 years ago

https://github.com/G4lile0/tinyGS/blob/2c688b85da829335d09b68ddcf8e5fe13a6faa85/tinyGS/src/Mqtt/MQTT_Client.cpp#L401

If a "begine" command is received from the MQTT broker which has no "sat" value, doc["sat"].as<char *>() returns a nullptr and then the call to strcpy() results in a null dereference and crash.