Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-9863 lmv: Off by two in lmv_fid2path()
[fs/lustre-release.git]
/
lustre
/
lmv
/
lmv_obd.c
diff --git
a/lustre/lmv/lmv_obd.c
b/lustre/lmv/lmv_obd.c
index
68ed668
..
904a7e0
100644
(file)
--- a/
lustre/lmv/lmv_obd.c
+++ b/
lustre/lmv/lmv_obd.c
@@
-683,8
+683,8
@@
repeat_fid2path:
char *ptr;
ori_gf = (struct getinfo_fid2path *)karg;
char *ptr;
ori_gf = (struct getinfo_fid2path *)karg;
- if (strlen(ori_gf->gf_u.gf_path) +
- strlen(gf->gf_u.gf_path) > ori_gf->gf_pathlen)
+ if (strlen(ori_gf->gf_u.gf_path) +
1 +
+ strlen(gf->gf_u.gf_path)
+ 1
> ori_gf->gf_pathlen)
GOTO(out_fid2path, rc = -EOVERFLOW);
ptr = ori_gf->gf_u.gf_path;
GOTO(out_fid2path, rc = -EOVERFLOW);
ptr = ori_gf->gf_u.gf_path;