From 4afee8b7be401a4174e90f5a12524b4d173b8fdc Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 2 Dec 2023 12:51:33 +0100 Subject: [PATCH] Avoid memory illegal access detected by Coverity Scan --- src/algorithms/libs/rtklib/rtklib_rtkcmn.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc b/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc index 512d3958c..f216e1344 100644 --- a/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc +++ b/src/algorithms/libs/rtklib/rtklib_rtkcmn.cc @@ -5225,6 +5225,7 @@ int expath(const char *path, char *paths[], int nmax) if (strlen(paths[i]) < 1025) { std::strncpy(tmp, paths[i], 1024); + tmp[1023] = '\0'; } else {