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)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 10 Mar 2013 03:15:45 +0000 (19:15 -0800)
commit95cd5b1d950ecb820179e4279b8570d8ad6780f5
tree7762062e95a4f71e861c26eb453b581d333f9129
parent98191d77617206c1923e73f2ce71ef2bd9c85161
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)

Change-Id: I80e3d35d7a9a4b57e8efc0cb0c7b2dc12f021063
Reviewed-on: http://gerrit.openafs.org/9443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/afsmonitor/afsmonitor.c