1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-05 23:10:34 +00:00

Avoid memory illegal access detected by Coverity Scan

This commit is contained in:
Carles Fernandez 2023-12-02 12:51:33 +01:00
parent 1685c896ea
commit 4afee8b7be
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -5225,6 +5225,7 @@ int expath(const char *path, char *paths[], int nmax)
if (strlen(paths[i]) < 1025) if (strlen(paths[i]) < 1025)
{ {
std::strncpy(tmp, paths[i], 1024); std::strncpy(tmp, paths[i], 1024);
tmp[1023] = '\0';
} }
else else
{ {