From 9602c32ea72b92c71f74a8b92943ed088c940297 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sat, 16 Nov 2024 20:50:25 +0100 Subject: [PATCH] mDNS malloc error fix --- EXmDNS.cpp | 4 ++-- STM32lwipopts.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/EXmDNS.cpp b/EXmDNS.cpp index 09a3391..14e824b 100644 --- a/EXmDNS.cpp +++ b/EXmDNS.cpp @@ -75,7 +75,7 @@ int MDNS::begin(const IPAddress& ip, char* name) { // delay(100); _ipAddress = ip; - _name = (char *)malloc(strlen(name +2)); + _name = (char *)malloc(strlen(name)+2); byte n; for(n = 0; n