From ae04d3dbb31d0679c91cdf01636910c14608435b Mon Sep 17 00:00:00 2001 From: jgromes Date: Sun, 2 Oct 2022 00:00:50 +0200 Subject: [PATCH] [Pager] Fixed strncpy length --- src/protocols/Pager/Pager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocols/Pager/Pager.cpp b/src/protocols/Pager/Pager.cpp index 37684208..85a6e76e 100644 --- a/src/protocols/Pager/Pager.cpp +++ b/src/protocols/Pager/Pager.cpp @@ -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, "", length); + strncpy((char*)data, "", length + 1); } // add null terminator