vol: check snprintf return values in namei_ops 63/13463/5
authorBenjamin Kaduk <kaduk@mit.edu>
Sat, 2 Feb 2019 18:49:07 +0000 (12:49 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 1 Mar 2019 14:33:06 +0000 (09:33 -0500)
commit8632f23d6718a3cd621791e82d1cf6ead8690978
tree322a0e53fd560b089fad1e32026650234bd37b92
parent453060c27a5d33d3c27128d169298f9d66d06f1a
vol: check snprintf return values in namei_ops

gcc8 is more aggressive about parsing format strings and computing bounds
on the generated text from functions like snprintf.  In this case it seems best
to detect cases of truncation and error out, rather than trying to increase
stack buffer sizes or switch to asprintf.  These paths should be well-behaved
since they are local to the fileserver, so this is mostly about appeasing the
compiler's -Wformat-truncation checks to allow us to build with --enable-checking.

Change-Id: Id3f15e450c0f03143c0cc7e40186d5944a8fa3b4
Reviewed-on: https://gerrit.openafs.org/13463
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/vol/namei_ops.c