Fixed WS281x output on ESP32
Fixed potential out-of-bounds write in MQTT Fixed IR pin not changeable if IR disabled Fixed XML API <wv> containing -1 on Manual only RGBW mode (see #888, #1783)
This commit is contained in:
@@ -64,9 +64,9 @@ void onMqttMessage(char* topic, char* payload, AsyncMqttClientMessageProperties
|
||||
}
|
||||
//make a copy of the payload to 0-terminate it
|
||||
char* payloadStr = new char[len+1];
|
||||
if (payloadStr == nullptr) return; //no mem
|
||||
strncpy(payloadStr, payload, len);
|
||||
payloadStr[len] = '\0';
|
||||
if (payloadStr == nullptr) return; //no mem
|
||||
DEBUG_PRINTLN(payloadStr);
|
||||
|
||||
size_t topicPrefixLen = strlen(mqttDeviceTopic);
|
||||
|
||||
Reference in New Issue
Block a user