asn1: Fix template decoration copy

This commit is contained in:
Nicolas Williams
2021-12-23 19:11:19 -06:00
parent f74e9223b6
commit 6baac3126f

View File

@@ -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;