summaryrefslogtreecommitdiff
path: root/src/iso7816.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/iso7816.c')
-rw-r--r--src/iso7816.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/iso7816.c b/src/iso7816.c
index e2ea281..a3fd280 100644
--- a/src/iso7816.c
+++ b/src/iso7816.c
@@ -13,7 +13,7 @@ iso7816_new(uint8_t ins, uint8_t p1, uint16_t payload_len)
13 iso7816_apdu_t *apdu; 13 iso7816_apdu_t *apdu;
14 size_t alloc_len; 14 size_t alloc_len;
15 15
16 alloc_len = sizeof(iso7816_apdu_t) + payload_len; 16 alloc_len = sizeof(iso7816_apdu_t) + payload_len + 2; /* le1 le2 */
17 17
18 if ((apdu = calloc(1, alloc_len)) == NULL) 18 if ((apdu = calloc(1, alloc_len)) == NULL)
19 return (NULL); 19 return (NULL);