Open mdkendall opened 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.
doc["sat"].as<char *>()
nullptr
strcpy()
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 anullptr
and then the call tostrcpy()
results in a null dereference and crash.