From 42f6c8801835ea837ab7b8a47fcb86e2d34e67c2 Mon Sep 17 00:00:00 2001 From: Lev Walkin Date: Fri, 20 Oct 2017 02:39:08 -0700 Subject: fix OER NULL and SEQUENCE extensions round-trip --- skeletons/NULL.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'skeletons/NULL.c') diff --git a/skeletons/NULL.c b/skeletons/NULL.c index 77a377e1..a43d412b 100644 --- a/skeletons/NULL.c +++ b/skeletons/NULL.c @@ -135,15 +135,24 @@ NULL_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_dec_rval_t NULL_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, - const asn_oer_constraints_t *constraints, void **struct_ptr, + const asn_oer_constraints_t *constraints, void **sptr, const void *ptr, size_t size) { asn_dec_rval_t rv = {RC_OK, 0}; (void)opt_codec_ctx; (void)td; (void)constraints; - (void)struct_ptr; (void)ptr; (void)size; + + if(!*sptr) { + *sptr = MALLOC(sizeof(NULL_t)); + if(*sptr) { + *(NULL_t *)*sptr = 0; + } else { + ASN__DECODE_FAILED; + } + } + return rv; } -- cgit v1.2.3