added stack control to PER

diff --git a/skeletons/constr_CHOICE.c b/skeletons/constr_CHOICE.c
index d3738df..33cec7e 100644
--- a/skeletons/constr_CHOICE.c
+++ b/skeletons/constr_CHOICE.c
@@ -827,6 +827,9 @@
 	void *st = *sptr;
 	int value;
 
+	if(_ASN_STACK_OVERFLOW_CHECK(opt_codec_ctx))
+		_ASN_DECODE_FAILED;
+
 	/*
 	 * Create the target structure if it is not present already.
 	 */