From 570c5636e192a5b62cb8e129dbc8da5ec1348e20 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Mon, 3 Mar 2014 12:50:44 +0100 Subject: [PATCH] don't do sizeof() on pointer even in test --- tests/test_key_generation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_key_generation.c b/tests/test_key_generation.c index f5a899c..f724bac 100644 --- a/tests/test_key_generation.c +++ b/tests/test_key_generation.c @@ -40,7 +40,7 @@ void _test_128_bits_key(YKP_CONFIG *ykp, struct config_st *cfg) unsigned char empty[256]; memset (empty, 0, sizeof(empty)); - memset (cfg, 0, sizeof(cfg)); + memset (cfg, 0, sizeof(struct config_st)); cfg->tktFlags = TKTFLAG_APPEND_CR; ykp_AES_key_from_passphrase(ykp, "test", "ABCDEF"); @@ -56,7 +56,7 @@ void _test_160_bits_key(YKP_CONFIG *ykp, struct config_st *cfg) unsigned char empty[256]; memset (empty, 0, sizeof(empty)); - memset (cfg, 0, sizeof(cfg)); + memset (cfg, 0, sizeof(struct config_st)); cfg->tktFlags = TKTFLAG_APPEND_CR | TKTFLAG_OATH_HOTP; ykp_AES_key_from_passphrase(ykp, "test", "ABCDEF"); -- 2.39.5