]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: make strncpy in ::respawn safer 1711/head
authorJohn Spray <john.spray@inktank.com>
Tue, 22 Apr 2014 15:31:27 +0000 (16:31 +0100)
committerJohn Spray <john.spray@inktank.com>
Tue, 22 Apr 2014 15:31:27 +0000 (16:31 +0100)
commitcac15c7d8b99037733fcdc237c419b78f9b6b83e
tree352c89a2f8ad5e7466876f4ae4b9b6a3022f2c74
parent623014623851a4df10e6412380823ca68cf72d5b
mds: make strncpy in ::respawn safer

Previous code assumed null terminated argv[0]
was not longer than PATH_MAX and the resulting
strncpy was not strictly safe.

Modify the bounds to ensure that copy will not
result in an unterminated string if argv[0]
is oversized.

Signed-off-by: John Spray <john.spray@inktank.com>
src/mds/MDS.cc