mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-23 14:30:08 +00:00
Fix truncation warning
This commit is contained in:
parent
5f5077ffc5
commit
8e1818f743
@ -2051,8 +2051,11 @@ void *ftpthread(void *arg)
|
||||
break;
|
||||
}
|
||||
}
|
||||
std::strncpy(ftp->local, local.c_str(), 1024);
|
||||
ftp->local[1023] = '\0';
|
||||
int ret2 = std::snprintf(ftp->local, 1024, "%s", local.c_str());
|
||||
if (ret2 < 0 || ret2 >= 1024)
|
||||
{
|
||||
tracet(3, "Error reading ftp local\n");
|
||||
}
|
||||
ftp->state = 2; /* ftp completed */
|
||||
|
||||
tracet(3, "ftpthread: complete cmd=%s\n", cmd_str.data());
|
||||
|
Loading…
x
Reference in New Issue
Block a user