add stack overflow protection for SEQUENCE and SEQUENCE OF
diff --git a/skeletons/constr_SEQUENCE_oer.c b/skeletons/constr_SEQUENCE_oer.c
index 6ef1e4d..85310a4 100644
--- a/skeletons/constr_SEQUENCE_oer.c
+++ b/skeletons/constr_SEQUENCE_oer.c
@@ -95,10 +95,11 @@
asn_struct_ctx_t *ctx; /* Decoder context */
size_t consumed_myself = 0; /* Consumed bytes from ptr. */
-
- (void)opt_codec_ctx;
(void)constraints;
+ if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx))
+ ASN__DECODE_FAILED;
+
/*
* Create the target structure if it is not present already.
*/
diff --git a/skeletons/constr_SET.c b/skeletons/constr_SET.c
index 994abb7..c54b5de 100644
--- a/skeletons/constr_SET.c
+++ b/skeletons/constr_SET.c
@@ -1,4 +1,4 @@
-/*-
+/*
* Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
diff --git a/skeletons/constr_SET_OF.c b/skeletons/constr_SET_OF.c
index f3f5294..e686471 100644
--- a/skeletons/constr_SET_OF.c
+++ b/skeletons/constr_SET_OF.c
@@ -1,5 +1,5 @@
-/*-
- * Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
+/*
+ * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
diff --git a/skeletons/constr_SET_OF_oer.c b/skeletons/constr_SET_OF_oer.c
index 1357c2b..d139fe9 100644
--- a/skeletons/constr_SET_OF_oer.c
+++ b/skeletons/constr_SET_OF_oer.c
@@ -117,9 +117,11 @@
asn_struct_ctx_t *ctx; /* Decoder context */
size_t consumed_myself = 0; /* Consumed bytes from ptr. */
- (void)opt_codec_ctx;
(void)constraints;
+ if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx))
+ ASN__DECODE_FAILED;
+
/*
* Create the target structure if it is not present already.
*/