From 26cbd3bdf5dad190559afbdf0ac125262c4e90a6 Mon Sep 17 00:00:00 2001 From: Nandaja Varma Date: Fri, 6 Feb 2015 11:44:22 +0530 Subject: rpc-lib: Fixing the coverity issues Coverity CIDs: 1210973 1124887 1124888 1124682 1124849 1124503 Change-Id: I012f6cf9d14753f572ab94aae6d442d1ef8df79a BUG: 789278 Signed-off-by: Nandaja Varma Reviewed-on: http://review.gluster.org/9600 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- rpc/rpc-lib/src/rpcsvc-auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc/rpc-lib/src/rpcsvc-auth.c') diff --git a/rpc/rpc-lib/src/rpcsvc-auth.c b/rpc/rpc-lib/src/rpcsvc-auth.c index 384e4a75db2..6b4c7937437 100644 --- a/rpc/rpc-lib/src/rpcsvc-auth.c +++ b/rpc/rpc-lib/src/rpcsvc-auth.c @@ -38,7 +38,7 @@ rpcsvc_auth_add_initer (struct list_head *list, char *idfier, } new->init = init; - strcpy (new->name, idfier); + strncpy (new->name, idfier, sizeof (new->name) - 1); INIT_LIST_HEAD (&new->authlist); list_add_tail (&new->authlist, list); return 0; -- cgit