From: Orgad Shaneh Date: Fri, 10 May 2024 15:08:25 +0000 (+0300) Subject: digest: replace strcpy for empty string with simple assignment X-Git-Tag: curl-8_8_0~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa9a564942b67d1bced95c6efdaef3aff5233818;p=thirdparty%2Fcurl.git digest: replace strcpy for empty string with simple assignment Closes #13586 --- 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 */