From aae9a9add52402e82497520a610947159b0dc27f Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Mon, 19 Jan 2015 09:28:55 +0100 Subject: [PATCH] calculate size of cfg array --- tests/pam_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/pam_test.c b/tests/pam_test.c index 959f118..53e87a5 100644 --- a/tests/pam_test.c +++ b/tests/pam_test.c @@ -49,7 +49,7 @@ int test_authenticate1(void) { "authfile=aux/authfile", "debug", }; - return pam_sm_authenticate(1, 0, 4, cfg); + return pam_sm_authenticate(1, 0, sizeof(cfg) / sizeof(char*), cfg); } int test_authenticate2(void) { @@ -59,7 +59,7 @@ int test_authenticate2(void) { "authfile=aux/authfile", "debug", }; - return pam_sm_authenticate(2, 0, 4, cfg); + return pam_sm_authenticate(2, 0, sizeof(cfg) / sizeof(char*), cfg); } const char * pam_strerror(pam_handle_t *pamh, int errnum) {