This commit is contained in:
Pavel Brychta 2025-01-03 16:49:39 +01:00
parent 697a3adf08
commit 9dca4f5dee

View File

@ -595,7 +595,7 @@ void AsyncWebSocketClient::_onData(void* pbuf, size_t plen) {
}
// restore byte as _handleEvent may have added a null terminator i.e., data[len] = 0;
if (datalen)
if (data && datalen > 0)
data[datalen] = datalast;
data += datalen;