mirror of
https://github.com/ceph/ceph
synced 2025-03-31 16:25:56 +00:00
Merge pull request #1711 from ceph/wip-coverity-respawn
mds: make strncpy in ::respawn safer Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
commit
f244109cb7
@ -1711,7 +1711,7 @@ void MDS::respawn()
|
||||
dout(1) << " cwd " << cwd << dendl;
|
||||
|
||||
/* Fall back to a best-effort: just running in our CWD */
|
||||
strncpy(exe_path, orig_argv[0], sizeof(exe_path));
|
||||
strncpy(exe_path, orig_argv[0], sizeof(exe_path) - 1);
|
||||
}
|
||||
|
||||
dout(1) << " exe_path " << exe_path << dendl;
|
||||
|
Loading…
Reference in New Issue
Block a user