From: Klas Lindfors Date: Mon, 3 Mar 2014 11:50:44 +0000 (+0100) Subject: don't do sizeof() on pointer X-Git-Tag: v1.15.1~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=570c5636e192a5b62cb8e129dbc8da5ec1348e20;p=yubikey-personalization don't do sizeof() on pointer even in test --- 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");