portability

diff --git a/skeletons/constr_SET.c b/skeletons/constr_SET.c
index 2fd0ac9..dc699f5 100644
--- a/skeletons/constr_SET.c
+++ b/skeletons/constr_SET.c
@@ -447,6 +447,12 @@
 	if(t2m_build_own) {
 		t2m = alloca(specs->elements_count * sizeof(t2m[0]));
 		t2m_count = 0;
+		if(!t2m) {	/* There are such platforms */
+			my_erval.encoded = -1;
+			my_erval.failed_type = sd;
+			my_erval.structure_ptr = ptr;
+			return my_erval;
+		}
 	} else {
 		/*
 		 * There is no untagged CHOICE in this SET.