It has elements from 0 to num_applets-1, and we were using elements from 0 to num_applets when iterating in cac_aca_get_applet_acr_coid() Signed-off-by: Christophe Fergeau <cfergeau@xxxxxxxxxx> --- src/cac-aca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cac-aca.c b/src/cac-aca.c index 3e1cb35..778772e 100644 --- a/src/cac-aca.c +++ b/src/cac-aca.c @@ -806,7 +806,7 @@ cac_aca_get_applet_acr_coid(unsigned int pki_applets, unsigned char *coid) r = g_malloc(sizeof(struct simpletlv_member)); - for (i = 0; i <= applets_table.num_applets; i++) { + for (i = 0; i < applets_table.num_applets; i++) { /* Skip unused PKI applets */ if (i >= pki_applets && i < 10) continue; -- 2.17.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel