diff options
author | meghana <mmadhusu@redhat.com> | 2013-08-20 15:13:42 -0400 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-09-19 09:24:15 -0700 |
commit | 7da8040d96ae16d6d2b6079ffd8cbcfe5d28aac4 (patch) | |
tree | 61c576fedc089dba6b1a43188583a21013d572ec /xlators/nfs/server/src/nfs3-fh.c | |
parent | c550ae69526ad60b2f288ddc98a59141b9e64dcc (diff) |
NFS : Coverity Fix.
NFS defects reported by Coverity run are fixed.
Change-Id: Ib66847e8e66fb4a06b312c80814f9eafb032eba2
BUG: 996390
Signed-off-by: meghana <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/5660
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Varun Shastry <vshastry@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators/nfs/server/src/nfs3-fh.c')
-rw-r--r-- | xlators/nfs/server/src/nfs3-fh.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/nfs/server/src/nfs3-fh.c b/xlators/nfs/server/src/nfs3-fh.c index c4f59a622c4..3ca61056baa 100644 --- a/xlators/nfs/server/src/nfs3-fh.c +++ b/xlators/nfs/server/src/nfs3-fh.c @@ -120,17 +120,17 @@ nfs3_fh_is_root_fh (struct nfs3_fh *fh) void -nfs3_fh_to_str (struct nfs3_fh *fh, char *str) +nfs3_fh_to_str (struct nfs3_fh *fh, char *str, size_t len) { - char gfid[512]; - char exportid[512]; + char gfid[GF_UUID_BUF_SIZE]; + char exportid[GF_UUID_BUF_SIZE]; if ((!fh) || (!str)) return; - sprintf (str, "FH: exportid %s, gfid %s", - uuid_utoa_r (fh->exportid, exportid), - uuid_utoa_r (fh->gfid, gfid)); + snprintf (str, len, "FH: exportid %s, gfid %s", + uuid_utoa_r (fh->exportid, exportid), + uuid_utoa_r (fh->gfid, gfid)); } void |