From 6baac3126fc36038b32304c52f5953cfa0dfd023 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Thu, 23 Dec 2021 19:11:19 -0600 Subject: [PATCH] asn1: Fix template decoration copy --- lib/asn1/template.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/asn1/template.c b/lib/asn1/template.c index 6f303d111..04e579d76 100644 --- a/lib/asn1/template.c +++ b/lib/asn1/template.c @@ -2889,7 +2889,8 @@ _asn1_copy(const struct asn1_template *t, const void *from, void *to) return ENOMEM; } - if ((t->tt & A1_OP_MASK) == A1_OP_TYPE) { + if ((t->tt & A1_OP_MASK) == A1_OP_TYPE || + (t->tt & A1_OP_MASK) == A1_OP_TYPE_DECORATE) { ret = _asn1_copy(t->ptr, fel, tel); } else { const struct asn1_type_func *f = t->ptr;