From fa9a564942b67d1bced95c6efdaef3aff5233818 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Fri, 10 May 2024 18:08:25 +0300 Subject: [PATCH] digest: replace strcpy for empty string with simple assignment Closes #13586 --- lib/vauth/digest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c index 358bfb60c3..a742cce26e 100644 --- a/lib/vauth/digest.c +++ b/lib/vauth/digest.c @@ -288,7 +288,7 @@ static CURLcode auth_decode_digest_md5_message(const struct bufref *chlgref, /* Retrieve realm string from the challenge */ if(!auth_digest_get_key_value(chlg, "realm=\"", realm, rlen, '\"')) { /* Challenge does not have a realm, set empty string [RFC2831] page 6 */ - strcpy(realm, ""); + *realm = '\0'; } /* Retrieve algorithm string from the challenge */ -- 2.47.3