]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
digest: replace strcpy for empty string with simple assignment
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>
Fri, 10 May 2024 15:08:25 +0000 (18:08 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 10 May 2024 20:52:36 +0000 (22:52 +0200)
Closes #13586

lib/vauth/digest.c

index 358bfb60c320e040af530466b4e4cfdd2d42f32a..a742cce26e80c4367ce2d0fe52884e5c68a2e354 100644 (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 */