summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-08-26 11:10:17 -0700
committerJunio C Hamano <gitster@pobox.com>2024-08-26 11:10:17 -0700
commit87f8426bf7f88d3a5424c486ff4e5fc4b1aa40ab (patch)
tree84467328eafbc12968e43084abd2a28a1de597fe
parent6a562e68a35cdaf9a93d77581475b57d3168ea26 (diff)
parentb201316835bbf2c49c2780f23cfd6146f6b8d1a2 (diff)
downloadgit-87f8426bf7f88d3a5424c486ff4e5fc4b1aa40ab.tar.gz
git-87f8426bf7f88d3a5424c486ff4e5fc4b1aa40ab.zip
Merge branch 'jk/osxkeychain-username-is-nul-terminated' into maint-2.46
The credential helper to talk to OSX keychain sometimes sent garbage bytes after the username, which has been corrected. * jk/osxkeychain-username-is-nul-terminated: credential/osxkeychain: respect NUL terminator in username
-rw-r--r--contrib/credential/osxkeychain/git-credential-osxkeychain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index 6ce22a28ed..1c8310d7fe 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -141,7 +141,7 @@ static void find_username_in_item(CFDictionaryRef item)
username_buf,
buffer_len,
ENCODING)) {
- write_item("username", username_buf, buffer_len - 1);
+ write_item("username", username_buf, strlen(username_buf));
}
free(username_buf);
}