{"thread":{"id":"58189","subject":"[PATCH] osx-keychain: fix compiler warning","startedAt":"2022-07-19T17:25:14Z","lastAt":"2022-07-19T18:29:26Z","messageCount":4,"participants":["Lessley Dennington via GitGitGadget","Derrick Stolee","Junio C Hamano","Glen Choo"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"459389","messageId":"pull.1293.git.1658251503775.gitgitgadget@gmail.com","threadId":"58189","inReplyTo":null,"subject":"[PATCH] osx-keychain: fix compiler warning","fromName":"Lessley Dennington via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-07-19T17:25:03Z","receivedAt":"2022-07-19T17:25:14Z","isPatch":true,"sender":{"key":"lessleydennington@gmail.com","avatar":"https://avatars.githubusercontent.com/u/11321782?v=4"},"body":"From: Lessley Dennington <lessleydennington@gmail.com>\n\nUpdate git-credential-osxkeychain.c to remove 'format string is not a string\nliteral (potentially insecure)' compiler warning by treating the string as\nan argument.\n\nSigned-off-by: Lessley Dennington <lessleydennington@gmail.com>\n---\n    osx-keychain: fix compiler warning\n    \n    Running make in contrib/credential/osxkeychain currently shows the\n    following warning:\n    \n    warning: format string is not a string literal (potentially insecure)\n    \n    This small change to treat the string as an argument fixes the issue.\n    \n    Thanks, Lessley\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1293%2Fldennington%2Ffix-osx-keychain-warning-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1293/ldennington/fix-osx-keychain-warning-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1293\n\n contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\nindex 0b44a9b7cc6..bf77748d602 100644\n--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n@@ -168,7 +168,7 @@ int main(int argc, const char **argv)\n \t\t\"usage: git credential-osxkeychain <get|store|erase>\";\n \n \tif (!argv[1])\n-\t\tdie(usage);\n+\t\tdie(\"%s\", usage);\n \n \tread_credential();\n \n\nbase-commit: 71a8fab31b70c417e8f5b5f716581f89955a7082\n-- \ngitgitgadget\n"},{"id":"459390","messageId":"19ab5c2b-6506-18c1-b8c1-b96074442edf@github.com","threadId":"58189","inReplyTo":"pull.1293.git.1658251503775.gitgitgadget@gmail.com","subject":"Re: [PATCH] osx-keychain: fix compiler warning","fromName":"Derrick Stolee","fromEmail":"derrickstolee@github.com","sentAt":"2022-07-19T17:30:32Z","receivedAt":"2022-07-19T17:30:36Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 7/19/2022 1:25 PM, Lessley Dennington via GitGitGadget wrote:\n> From: Lessley Dennington <lessleydennington@gmail.com>\n> \n> Update git-credential-osxkeychain.c to remove 'format string is not a string\n> literal (potentially insecure)' compiler warning by treating the string as\n> an argument.\n\n>  \tif (!argv[1])\n> -\t\tdie(usage);\n> +\t\tdie(\"%s\", usage);\n\nThanks for preparing this for upstream. I reviewed this change as we\nwere doing related things in the microsoft/git fork. LGTM here, too.\n\nThanks,\n-Stolee\n"},{"id":"459403","messageId":"xmqq8roparkd.fsf@gitster.g","threadId":"58189","inReplyTo":"pull.1293.git.1658251503775.gitgitgadget@gmail.com","subject":"Re: [PATCH] osx-keychain: fix compiler warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-07-19T18:24:50Z","receivedAt":"2022-07-19T18:24:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Lessley Dennington via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Lessley Dennington <lessleydennington@gmail.com>\n>\n> Update git-credential-osxkeychain.c to remove 'format string is not a string\n> literal (potentially insecure)' compiler warning by treating the string as\n> an argument.\n>\n> Signed-off-by: Lessley Dennington <lessleydennington@gmail.com>\n> ---\n\nPerfect.  Thanks.  Will queue.\n\n> @@ -168,7 +168,7 @@ int main(int argc, const char **argv)\n>  \t\t\"usage: git credential-osxkeychain <get|store|erase>\";\n>  \n>  \tif (!argv[1])\n> -\t\tdie(usage);\n> +\t\tdie(\"%s\", usage);\n>  \n>  \tread_credential();\n>  \n>\n> base-commit: 71a8fab31b70c417e8f5b5f716581f89955a7082\n"},{"id":"459404","messageId":"kl6llespt0qn.fsf@chooglen-macbookpro.roam.corp.google.com","threadId":"58189","inReplyTo":"pull.1293.git.1658251503775.gitgitgadget@gmail.com","subject":"Re: [PATCH] osx-keychain: fix compiler warning","fromName":"Glen Choo","fromEmail":"chooglen@google.com","sentAt":"2022-07-19T18:29:20Z","receivedAt":"2022-07-19T18:29:26Z","isPatch":true,"sender":{"key":"glencbz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/58092771?v=4"},"body":"\"Lessley Dennington via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Lessley Dennington <lessleydennington@gmail.com>\n>\n> Update git-credential-osxkeychain.c to remove 'format string is not a string\n> literal (potentially insecure)' compiler warning by treating the string as\n> an argument.\n>\n> Signed-off-by: Lessley Dennington <lessleydennington@gmail.com>\n> ---\n>     osx-keychain: fix compiler warning\n>     \n>     Running make in contrib/credential/osxkeychain currently shows the\n>     following warning:\n>     \n>     warning: format string is not a string literal (potentially insecure)\n>     \n>     This small change to treat the string as an argument fixes the issue.\n>     \n>     Thanks, Lessley\n\nThanks! I literally just ran into this warning, and it's been already\nfixed :)\n\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1293%2Fldennington%2Ffix-osx-keychain-warning-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1293/ldennington/fix-osx-keychain-warning-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/1293\n>\n>  contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n> index 0b44a9b7cc6..bf77748d602 100644\n> --- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n> +++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c\n> @@ -168,7 +168,7 @@ int main(int argc, const char **argv)\n>  \t\t\"usage: git credential-osxkeychain <get|store|erase>\";\n>  \n>  \tif (!argv[1])\n> -\t\tdie(usage);\n> +\t\tdie(\"%s\", usage);\n>  \n>  \tread_credential();\n\nLooks good!\n\n>  \n>\n> base-commit: 71a8fab31b70c417e8f5b5f716581f89955a7082\n> -- \n> gitgitgadget\n"}]}