From: "René van Dorst" <opensource@vdorst.com>
To: wireguard@lists.zx2c4.com
Subject: [PATCH] Using the wrong variable in loop.
Date: Thu, 8 Feb 2018 21:21:43 +0100 [thread overview]
Message-ID: <20180208202143.326-1-opensource@vdorst.com> (raw)
Fix compiler error:
WireGuard/src/crypto/../selftest/poly1305.h:1497:10: warning: iteration 35u invokes undefined behavior [-Waggressive-loop-optimizations]
size_t inlen = poly1305_testvecs[i].input.size;
^
WireGuard/src/crypto/../selftest/poly1305.h:1494:2: note: containing loop
for (i = 0; i < ARRAY_SIZE(chacha20poly1305_enc_vectors); ++i) {
---
src/selftest/poly1305.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/selftest/poly1305.h b/src/selftest/poly1305.h
index 2b93d50..9428eba 100644
--- a/src/selftest/poly1305.h
+++ b/src/selftest/poly1305.h
@@ -1491,7 +1491,7 @@ bool __init poly1305_selftest(void)
bool success = true;
size_t i;
- for (i = 0; i < ARRAY_SIZE(chacha20poly1305_enc_vectors); ++i) {
+ for (i = 0; i < ARRAY_SIZE(poly1305_testvecs); ++i) {
struct poly1305_ctx poly1305;
const u8 *in = poly1305_testvecs[i].input.data;
size_t inlen = poly1305_testvecs[i].input.size;
--
2.13.6
reply other threads:[~2018-02-08 20:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180208202143.326-1-opensource@vdorst.com \
--to=opensource@vdorst.com \
--cc=wireguard@lists.zx2c4.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox