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:
parent
1685c896ea
commit
4afee8b7be
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user