X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fllapi_fid_test.c;h=8f2f9465550c965fca8211e0cb2820691be8d3eb;hb=refs%2Fchanges%2F74%2F35374%2F9;hp=cefc10d517fa6bad54e45e6f8a699f0b6586f916;hpb=ccabce23bd9e366c345c852f565766a799f61238;p=fs%2Flustre-release.git diff --git a/lustre/tests/llapi_fid_test.c b/lustre/tests/llapi_fid_test.c index cefc10d..8f2f946 100644 --- a/lustre/tests/llapi_fid_test.c +++ b/lustre/tests/llapi_fid_test.c @@ -333,7 +333,7 @@ static void test20(void) /* Create subdirectories as long as we can. Each new subdir is * "/x", so we need at least 3 characters left in testpath. */ while (len <= sizeof(testpath) - 3) { - strncat(testpath, "/x", 2); + strncat(testpath, "/x", sizeof(testpath) - 1); len += 2; @@ -369,7 +369,7 @@ static void test30(void) bool seen; } links[num_links]; char buf[PATH_MAX]; - char buf2[PATH_MAX]; + char buf2[PATH_MAX * 2]; struct lu_fid fid; char fidstr[FID_LEN + 1]; int rc;