Whamcloud - gitweb
LU-9863 lmv: Off by two in lmv_fid2path() 77/28477/2
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 11 Aug 2017 00:26:39 +0000 (20:26 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 28 Aug 2017 06:25:44 +0000 (06:25 +0000)
commit3f86915bdfe506ac9070f091b5a1c52ed134f5d2
tree32a2800cec902b73298137d7515adef524486199
parenta9e0b853aabc1c817e3f4c250714ed86bb76a1ee
LU-9863 lmv: Off by two in lmv_fid2path()

We want to concatonate join string one, a '/' character, string two and
then a NUL terminator. The destination buffer holds ori_gf->gf_pathlen
characters. The strlen() function returns the number of characters not
counting the NUL terminator. So we should be adding two extra spaces,
one for the foward slash and one for the NULL.

Change-Id: Ia96461a2d1b3331f44d3791ca0148f6e836caf0d
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28477
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lmv/lmv_obd.c