vlserver: Use bounded string copy in FindByName() 63/14763/3
authorMichael Meffie <mmeffie@sinenomine.net>
Thu, 19 Aug 2021 16:52:30 +0000 (12:52 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 17 Sep 2021 05:39:54 +0000 (01:39 -0400)
commit494ec08cd04da6f96be02c7dc22d9bb0c409d63b
tree34ac652e17975fc9ba9ee077146f74aa7ff453db
parentfd22b1720887d27f1d59f7c66e00f2e78cdfe49a
vlserver: Use bounded string copy in FindByName()

Although the volname string passed to FindByName() is currently always
limited 65 characters (including the terminating nul), to be on the safe
side, use the bounded strlcpy() function when coping the volname to the
temporary tname local variable to avoid the possibility of overwriting
the stack with an unbounded strcpy().

Change-Id: I12a8ca2901147c7dd88e63339d0d11c3c89bf94a
Reviewed-on: https://gerrit.openafs.org/14763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/vlserver/vlutils.c