From 340a9db47b5897d6d8d69441b96c777f4ee08328 Mon Sep 17 00:00:00 2001 From: 515kie <1428196074@qq.com> Date: Wed, 17 Jan 2024 14:34:04 +0000 Subject: [PATCH] S15kie Signed-off-by: 515kie <1428196074@qq.com> --- mount.cifs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mount.cifs.c b/mount.cifs.c index 9f2aa89..e0ce8cf 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -609,17 +609,14 @@ static int open_cred_file(char *file_name, goto return_i; break; case CRED_DOM: - if (parsed_info->verboseflag) - fprintf(stderr, "domain=%s\n", - temp_val); + strlcpy(parsed_info->domain, temp_val, sizeof(parsed_info->domain)); break; case CRED_UNPARSEABLE: if (parsed_info->verboseflag) fprintf(stderr, "Credential formatted " - "incorrectly: %s\n", - temp_val ? temp_val : "(null)"); + "incorrectly\n"); break; } } -- Gitee