afsmonitor: Fix theoretical overflow of handler string
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 12:00:47 +0000 (12:00 +0000)
committerStephan Wiesand <stephan.wiesand@desy.de>
Tue, 3 Jun 2014 16:52:39 +0000 (12:52 -0400)
commitba71a23fd47ee603eba670259caf96b8618fc8cc
tree3db360a26935c8ae02097eeba9fafcc3580ae93c
parent7eb63cd21ee57312ca71930d59f49177d80f4f2a
afsmonitor: Fix theoretical overflow of handler string

Don't do an unbounded copy into the thresh structure's handler
string, in case the caller has passed us a string which is too
long.

Instead, switch to strlcpy for all string copies.

Caught by coverity (#985761)

Reviewed-on: http://gerrit.openafs.org/9443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 95cd5b1d950ecb820179e4279b8570d8ad6780f5)

Change-Id: Id8d7f3b97ac3ccbf65862d61b2f9e9d39baeb162
Reviewed-on: http://gerrit.openafs.org/11057
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afsmonitor/afsmonitor.c