From 35f028a57cb8a655abc5dd4da6c967b1ece68b30 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Sun, 4 Oct 2015 17:33:14 +0200 Subject: [PATCH] pkcs15-init.c: fixed accessing label in sc_pkcs15_object_t --- src/tools/pkcs15-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/pkcs15-init.c b/src/tools/pkcs15-init.c index 44c0f734..5785cf47 100644 --- a/src/tools/pkcs15-init.c +++ b/src/tools/pkcs15-init.c @@ -1015,7 +1015,7 @@ is_cacert_already_present(struct sc_pkcs15init_certargs *args) if (!cinfo->authority) continue; - if (strcmp(args->label, objs[i]->label)) + if (strncmp(args->label, objs[i]->label, sizeof objs[i]->label)) continue; /* XXX we should also match the usage field here */