From 3b6bb19210f6bdae501806d54d2ec380389ac616 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Wed, 25 May 2016 15:33:08 +0200 Subject: [PATCH] initialize id_icc to NULL if not given --- npa/src/npa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npa/src/npa.c b/npa/src/npa.c index 4a406be..51fb393 100644 --- a/npa/src/npa.c +++ b/npa/src/npa.c @@ -304,7 +304,8 @@ npa_sm_ctx_create(EAC_CTX *ctx, const unsigned char *certificate_description, out->id_icc = BUF_MEM_create_init(id_icc, id_icc_length); if (!out->id_icc) goto err; - } + } else + out->id_icc = NULL; out->eph_pub_key = NULL; out->auxiliary_data = NULL;