[Pager] Fixed strncpy length

This commit is contained in:
jgromes 2022-10-02 00:00:50 +02:00 committed by Federico Maggi
parent 4059fa6a8d
commit 4ea15d23c7
No known key found for this signature in database
GPG key ID: BA2EDAFB4F2486BC

View file

@ -264,7 +264,7 @@ int16_t PagerClient::readData(String& str, size_t len) {
// check tone-only tramsissions
if(length == 0) {
length = 6;
strncpy((char*)data, "<tone>", length);
strncpy((char*)data, "<tone>", length + 1);
}
// add null terminator