Preventing possibility of buffer overwrite.

This commit is contained in:
Francois 2023-10-02 16:14:19 -04:00
parent 831d3640cc
commit 3e26b9039d
1 changed files with 1 additions and 1 deletions

View File

@ -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