* [PATCH] osx-keychain: fix compiler warning
@ 2022-07-19 17:25 Lessley Dennington via GitGitGadget
2022-07-19 17:30 ` Derrick Stolee
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lessley Dennington via GitGitGadget @ 2022-07-19 17:25 UTC (permalink / raw)
To: git; +Cc: gitster, Lessley Dennington, Lessley Dennington
From: Lessley Dennington <lessleydennington@gmail.com>
Update git-credential-osxkeychain.c to remove 'format string is not a string
literal (potentially insecure)' compiler warning by treating the string as
an argument.
Signed-off-by: Lessley Dennington <lessleydennington@gmail.com>
---
osx-keychain: fix compiler warning
Running make in contrib/credential/osxkeychain currently shows the
following warning:
warning: format string is not a string literal (potentially insecure)
This small change to treat the string as an argument fixes the issue.
Thanks, Lessley
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1293%2Fldennington%2Ffix-osx-keychain-warning-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1293/ldennington/fix-osx-keychain-warning-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1293
contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index 0b44a9b7cc6..bf77748d602 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -168,7 +168,7 @@ int main(int argc, const char **argv)
"usage: git credential-osxkeychain <get|store|erase>";
if (!argv[1])
- die(usage);
+ die("%s", usage);
read_credential();
base-commit: 71a8fab31b70c417e8f5b5f716581f89955a7082
--
gitgitgadget
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] osx-keychain: fix compiler warning
2022-07-19 17:25 [PATCH] osx-keychain: fix compiler warning Lessley Dennington via GitGitGadget
@ 2022-07-19 17:30 ` Derrick Stolee
2022-07-19 18:24 ` Junio C Hamano
2022-07-19 18:29 ` Glen Choo
2 siblings, 0 replies; 4+ messages in thread
From: Derrick Stolee @ 2022-07-19 17:30 UTC (permalink / raw)
To: Lessley Dennington via GitGitGadget, git; +Cc: gitster, Lessley Dennington
On 7/19/2022 1:25 PM, Lessley Dennington via GitGitGadget wrote:
> From: Lessley Dennington <lessleydennington@gmail.com>
>
> Update git-credential-osxkeychain.c to remove 'format string is not a string
> literal (potentially insecure)' compiler warning by treating the string as
> an argument.
> if (!argv[1])
> - die(usage);
> + die("%s", usage);
Thanks for preparing this for upstream. I reviewed this change as we
were doing related things in the microsoft/git fork. LGTM here, too.
Thanks,
-Stolee
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] osx-keychain: fix compiler warning
2022-07-19 17:25 [PATCH] osx-keychain: fix compiler warning Lessley Dennington via GitGitGadget
2022-07-19 17:30 ` Derrick Stolee
@ 2022-07-19 18:24 ` Junio C Hamano
2022-07-19 18:29 ` Glen Choo
2 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2022-07-19 18:24 UTC (permalink / raw)
To: Lessley Dennington via GitGitGadget; +Cc: git, Lessley Dennington
"Lessley Dennington via GitGitGadget" <gitgitgadget@gmail.com>
writes:
> From: Lessley Dennington <lessleydennington@gmail.com>
>
> Update git-credential-osxkeychain.c to remove 'format string is not a string
> literal (potentially insecure)' compiler warning by treating the string as
> an argument.
>
> Signed-off-by: Lessley Dennington <lessleydennington@gmail.com>
> ---
Perfect. Thanks. Will queue.
> @@ -168,7 +168,7 @@ int main(int argc, const char **argv)
> "usage: git credential-osxkeychain <get|store|erase>";
>
> if (!argv[1])
> - die(usage);
> + die("%s", usage);
>
> read_credential();
>
>
> base-commit: 71a8fab31b70c417e8f5b5f716581f89955a7082
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] osx-keychain: fix compiler warning
2022-07-19 17:25 [PATCH] osx-keychain: fix compiler warning Lessley Dennington via GitGitGadget
2022-07-19 17:30 ` Derrick Stolee
2022-07-19 18:24 ` Junio C Hamano
@ 2022-07-19 18:29 ` Glen Choo
2 siblings, 0 replies; 4+ messages in thread
From: Glen Choo @ 2022-07-19 18:29 UTC (permalink / raw)
To: Lessley Dennington via GitGitGadget, git; +Cc: gitster, Lessley Dennington
"Lessley Dennington via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Lessley Dennington <lessleydennington@gmail.com>
>
> Update git-credential-osxkeychain.c to remove 'format string is not a string
> literal (potentially insecure)' compiler warning by treating the string as
> an argument.
>
> Signed-off-by: Lessley Dennington <lessleydennington@gmail.com>
> ---
> osx-keychain: fix compiler warning
>
> Running make in contrib/credential/osxkeychain currently shows the
> following warning:
>
> warning: format string is not a string literal (potentially insecure)
>
> This small change to treat the string as an argument fixes the issue.
>
> Thanks, Lessley
Thanks! I literally just ran into this warning, and it's been already
fixed :)
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1293%2Fldennington%2Ffix-osx-keychain-warning-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1293/ldennington/fix-osx-keychain-warning-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/1293
>
> contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
> index 0b44a9b7cc6..bf77748d602 100644
> --- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
> +++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
> @@ -168,7 +168,7 @@ int main(int argc, const char **argv)
> "usage: git credential-osxkeychain <get|store|erase>";
>
> if (!argv[1])
> - die(usage);
> + die("%s", usage);
>
> read_credential();
Looks good!
>
>
> base-commit: 71a8fab31b70c417e8f5b5f716581f89955a7082
> --
> gitgitgadget
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-19 18:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 17:25 [PATCH] osx-keychain: fix compiler warning Lessley Dennington via GitGitGadget
2022-07-19 17:30 ` Derrick Stolee
2022-07-19 18:24 ` Junio C Hamano
2022-07-19 18:29 ` Glen Choo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).