digest: replace strcpy for empty string with simple assignment

Closes #13586
This commit is contained in:
Orgad Shaneh 2024-05-10 18:08:25 +03:00 committed by Daniel Stenberg
parent b65f0e04b9
commit fa9a564942
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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 */