From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH] builtin/receive-pack: use constant-time comparison for HMAC value
Date: Wed, 22 Apr 2020 08:57:13 -0700 [thread overview]
Message-ID: <xmqqo8rjjyxy.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200422102734.GA3063@szeder.dev> ("SZEDER Gábor"'s message of "Wed, 22 Apr 2020 12:27:34 +0200")
Subject: receive-pack: compilation fix
We do not use C99 "for loop initial declaration" in our codebase
(yet), but one snuck in.
Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
builtin/receive-pack.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 45e2dd2a65..66149777a0 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -505,7 +505,9 @@ static char *find_header(const char *msg, size_t len, const char *key,
static int constant_memequal(const char *a, const char *b, size_t n)
{
int res = 0;
- for (size_t i = 0; i < n; i++)
+ size_t i;
+
+ for (i = 0; i < n; i++)
res |= a[i] ^ b[i];
return res;
}
--
2.26.2-108-g048abe1751
prev parent reply other threads:[~2020-04-22 15:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 23:37 [PATCH] builtin/receive-pack: use constant-time comparison for HMAC value brian m. carlson
2020-04-10 0:09 ` Junio C Hamano
2020-04-10 0:21 ` Junio C Hamano
2020-04-10 0:56 ` brian m. carlson
2020-04-22 10:27 ` SZEDER Gábor
2020-04-22 15:57 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqo8rjjyxy.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=sandals@crustytoothpaste.net \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).