[Gridflow-cvs] [svn] commit: r4105 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Oct 17 16:12:41 EDT 2008


Author: matju
Date: Fri Oct 17 16:12:41 2008
New Revision: 4105

Log:
check input of [#unpack], to prevent segfault

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Fri Oct 17 16:12:41 2008
@@ -2251,6 +2251,8 @@
 	\grin 0
 };
 GRID_INLET(0) {
+	if (in->dim->n!=1) RAISE("expect one dimension");
+	if (in->dim->v[0]!=this->n) RAISE("expecting dim(%ld), got dim(%ld)",this->n,in->dim->v[0]);
 	in->set_chunk(0);
 } GRID_FLOW {
 	for (int i=n-1; i>=0; i--) outlet_float(bself->outlets[i],(t_float)data[i]);



More information about the Gridflow-cvs mailing list