]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urlapi: clear password buffer on error path
authorViktor Szakats <commit@vsz.me>
Wed, 29 Jul 2026 15:09:06 +0000 (17:09 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 29 Jul 2026 17:12:55 +0000 (19:12 +0200)
Reported by Copilot
Bug: https://github.com/curl/curl/pull/21637#pullrequestreview-4809702512
Follow-up to 112a8b5adf36c17e7816a8db701b3e7a22958e52 #21637
Follow-up to 7c34365ccea19949317878c7fcd5f7376e2e09f1 #21879

Closes #22432

lib/urlapi.c

index b4dfdda678a3292ef10a78225dd49d3b3570aa95..1e61fbcae57d2aa99251b0b09013dcdd186c02aa 100644 (file)
@@ -347,6 +347,7 @@ out:
   curlx_free(passwdp);
   curlx_free(optionsp);
   curlx_safefree(u->user);
+  curlx_strzero(u->password);
   curlx_safefree(u->password);
   curlx_safefree(u->options);