diff options
author | Avra Sengupta <asengupt@redhat.com> | 2016-06-10 16:33:04 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2016-06-10 07:39:02 -0700 |
commit | 3474aa85e399a92d3ee9159a2d066d4bd73611a0 (patch) | |
tree | d59ff1b0bdb3a6b11f8ddf9ee59e21c81ca72fc3 /xlators/features/changetimerecorder/src | |
parent | 3bc419d8014877f64e57dc3368b0609396ec0d12 (diff) |
tiering/ctr: Fix strcpy coverity
Change-Id: I6cffba3e09a023f105dbf2975cc9a3ae1a965c31
BUG: 1344686
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/14696
Reviewed-by: mohammed rafi kc <rkavunga@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: N Balachandran <nbalacha@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/features/changetimerecorder/src')
-rw-r--r-- | xlators/features/changetimerecorder/src/changetimerecorder.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c index 95ce08fea2b..b6ff18934fe 100644 --- a/xlators/features/changetimerecorder/src/changetimerecorder.c +++ b/xlators/features/changetimerecorder/src/changetimerecorder.c @@ -126,8 +126,9 @@ ctr_lookup_wind(call_frame_t *frame, /* Copy hard link info*/ gf_uuid_copy (CTR_DB_REC(ctr_local).pargfid, *((NEW_LINK_CX(ctr_inode_cx))->pargfid)); - strcpy (CTR_DB_REC(ctr_local).file_name, - NEW_LINK_CX(ctr_inode_cx)->basename); + strncpy (CTR_DB_REC(ctr_local).file_name, + NEW_LINK_CX(ctr_inode_cx)->basename, + sizeof(CTR_DB_REC(ctr_local).file_name)); /* Since we are in lookup we can ignore errors while * Inserting in the DB, because there may be many |