From 489dd50140eadb8bad1b37b5ec49078d43735bb9 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Fri, 7 Sep 2018 12:35:47 -0400 Subject: auth_gss.c: buffer_size_warning Calling strncpy with a maximum size argument of 128 bytes on destination array "options_ret->actual_mechanism" of size 128 bytes might leave the destination string unterminated Signed-off-by: Steve Dickson --- src/auth_gss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/auth_gss.c b/src/auth_gss.c index 289bd5b..7d08262 100644 --- a/src/auth_gss.c +++ b/src/auth_gss.c @@ -593,7 +593,7 @@ _rpc_gss_refresh(AUTH *auth, rpc_gss_options_ret_t *options_ret) if (rpc_gss_oid_to_mech(actual_mech_type, &mechanism)) { strncpy(options_ret->actual_mechanism, mechanism, - sizeof(options_ret->actual_mechanism)); + (sizeof(options_ret->actual_mechanism)-1)); } gd->established = TRUE; -- cgit v1.2.1