From 9dca4f5dee07565ffe2dac64aeeb634aa9610d5a Mon Sep 17 00:00:00 2001 From: Pablo2048 Date: Fri, 3 Jan 2025 16:49:39 +0100 Subject: [PATCH] Implementace fixu z https://github.com/me-no-dev/ESPAsyncWebServer/issues/1458 --- src/AsyncWebSocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp index 9deb74a..aeb3747 100644 --- a/src/AsyncWebSocket.cpp +++ b/src/AsyncWebSocket.cpp @@ -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;