From 3e26b9039d69b79bf6536cd6961a85a037a9e606 Mon Sep 17 00:00:00 2001 From: Francois Date: Mon, 2 Oct 2023 16:14:19 -0400 Subject: [PATCH] Preventing possibility of buffer overwrite. --- src/HomeSpan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HomeSpan.h b/src/HomeSpan.h index 5a22b59..d207c1a 100644 --- a/src/HomeSpan.h +++ b/src/HomeSpan.h @@ -490,7 +490,7 @@ class SpanCharacteristic{ return(String(c)); case FORMAT::STRING: case FORMAT::DATA: - sprintf(c,"\"%s\"",u.STRING); + sprintf(c,"\"%.61s\"",u.STRING); // Truncating string to 61 chars. return(String(c)); } // switch return(String()); // included to prevent compiler warnings