From fc763ba5d53726b4a26b1f1919c36667d9abd2ed Mon Sep 17 00:00:00 2001 From: "ludovic.rousseau" Date: Thu, 8 Dec 2005 09:05:56 +0000 Subject: [PATCH] etcos_create_file_44(): use sizeof(pins)/sizeof(pins[0]) instead of a constant (7) git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2761 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/card-setcos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libopensc/card-setcos.c b/src/libopensc/card-setcos.c index 600cb62c..e06e7d3f 100644 --- a/src/libopensc/card-setcos.c +++ b/src/libopensc/card-setcos.c @@ -362,7 +362,7 @@ static int setcos_create_file_44(sc_card_t *card, sc_file_t *file) SETEC_LCSI_CREATE : SETEC_LCSI_ACTIVATED; u8 bCommands_always = 0; int pins[] = {-1, -1, -1, -1, -1, -1, -1}; - u8 bCommands_pin[7]; /* both 7 entries big */ + u8 bCommands_pin[sizeof(pins)/sizeof(pins[0])]; /* both 7 entries big */ u8 bCommands_key = 0; u8 bNumber = 0; u8 bPinNumber = 0;