Bug 1711836 - Fix GCC warning about the use of strncpy in SandboxBroker::ThreadMain. r=jld

Differential Revision: https://phabricator.services.mozilla.com/D115449
This commit is contained in:
Mike Hommey 2021-05-20 08:22:20 +00:00
Родитель 6e630edb09
Коммит 0ec9b5902e
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -738,7 +738,7 @@ void SandboxBroker::ThreadMain(void) {
// 0 immediately (we nulled the buffer before receiving).
// We do not assume the second path is 0-terminated, this is
// enforced below.
strncpy(pathBuf2, recvBuf + first_len + 1, kMaxPathLen + 1);
strncpy(pathBuf2, recvBuf + first_len + 1, kMaxPathLen);
// First string is guaranteed to be 0-terminated.
pathLen = first_len;