Merge pull request #659 from frankonski/buffer_overwrite
Preventing possibility of buffer overwrite.
This commit is contained in:
commit
e42cb4e1dd
|
|
@ -532,7 +532,7 @@ class SpanCharacteristic{
|
||||||
return(String(c));
|
return(String(c));
|
||||||
case FORMAT::STRING:
|
case FORMAT::STRING:
|
||||||
case FORMAT::DATA:
|
case FORMAT::DATA:
|
||||||
sprintf(c,"\"%s\"",u.STRING);
|
sprintf(c,"\"%.61s\"",u.STRING); // Truncating string to 61 chars.
|
||||||
return(String(c));
|
return(String(c));
|
||||||
} // switch
|
} // switch
|
||||||
return(String()); // included to prevent compiler warnings
|
return(String()); // included to prevent compiler warnings
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue