From 531aa6c9793c92aefed270843e4cfe33ea62fb57 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 28 Jun 2010 23:50:05 +0000 Subject: Setup buffer size properly in AES tests. --- src/aes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aes.c b/src/aes.c index b7a1bdc..5b94ef5 100644 --- a/src/aes.c +++ b/src/aes.c @@ -214,6 +214,7 @@ p11t_aes_test_key (CK_SESSION_HANDLE session, CK_OBJECT_HANDLE key) /* We try to wrap itself, not sure if that's the best idea ... */ for (i = 0; i < attrs[0].ulValueLen / sizeof (CK_ULONG); ++i) { + n_buffer = sizeof (buffer); if (mechanisms[i] == CKM_AES_CBC_PAD) if (!test_aes_wrap (session, key, key, buffer, &n_buffer)) return STOP; -- cgit v1.2.3