From: Niels Möller Date: Mon, 24 Nov 2014 20:11:03 +0000 (+0100) Subject: GCM_SET_KEY: Rename macro argument to avoid collision with struct tag. X-Git-Tag: nettle_3.1rc1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fccdf01b7b6f2c03e7f04db75006797fccc073f0;p=thirdparty%2Fnettle.git GCM_SET_KEY: Rename macro argument to avoid collision with struct tag. Spotted by Nikos Mavrogiannopoulos. --- diff --git a/ChangeLog b/ChangeLog index 57de0f75..44e778f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-11-24 Niels Möller + * gcm.h (GCM_SET_KEY): Rename macro argument KEY to avoid + collision with a struct tag. Spotted by Nikos Mavrogiannopoulos. + * testsuite/eddsa-verify-test.c (test_eddsa): Fixed test case bug, showing up as use of uninitialized data with valgrind. diff --git a/gcm.h b/gcm.h index f66a0dcd..c157f829 100644 --- a/gcm.h +++ b/gcm.h @@ -151,9 +151,9 @@ gcm_digest(struct gcm_ctx *ctx, const struct gcm_key *key, { struct gcm_key key; struct gcm_ctx gcm; type cipher; } /* NOTE: Avoid using NULL, as we don't include anything defining it. */ -#define GCM_SET_KEY(ctx, set_key, encrypt, key) \ +#define GCM_SET_KEY(ctx, set_key, encrypt, gcm_key) \ do { \ - (set_key)(&(ctx)->cipher, (key)); \ + (set_key)(&(ctx)->cipher, (gcm_key)); \ if (0) (encrypt)(&(ctx)->cipher, 0, (void *)0, (void *)0); \ gcm_set_key(&(ctx)->key, &(ctx)->cipher, \ (nettle_cipher_func *) (encrypt)); \