From a53ba4e51ccc6d23a9fd6b5048c07d7253238b25 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Mon, 30 Jun 2014 07:25:48 +0200 Subject: [PATCH] fixed memory handling of boxing asn1 structure --- npa/src/boxing.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/npa/src/boxing.c b/npa/src/boxing.c index 64fe85d..4dca68e 100644 --- a/npa/src/boxing.c +++ b/npa/src/boxing.c @@ -388,11 +388,15 @@ int boxing_buf_to_pace_output(sc_context_t *ctx, errorCode); sc_format_asn1_entry(errorCode, &output->result, &result_len, 0); + /* we already allocated memory for the result */ + errorCode->flags = 0; sc_copy_asn1_entry(g_octet_string, statusMSESetAT); sc_format_asn1_entry(statusMSESetAT, &status_mse_set_at, &status_mse_set_at_len, 0); + /* we already allocated memory for the result */ + statusMSESetAT->flags = 0; sc_copy_asn1_entry(g_octet_string, idPICC);