[Gridflow-cvs] [svn] commit: r5468 - /trunk/src/classes1.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sun Apr 18 23:53:50 EDT 2010


Author: matju
Date: Sun Apr 18 23:53:49 2010
New Revision: 5468

Log:
fixed two buffer overflows in put_at (turning them into error messages)

Modified:
    trunk/src/classes1.cxx

Modified: trunk/src/classes1.cxx
==============================================================================
--- trunk/src/classes1.cxx (original)
+++ trunk/src/classes1.cxx Sun Apr 18 23:53:49 2010
@@ -484,6 +484,8 @@
 	snap_backstore(r);
 	SAME_TYPE(in,r);
 	long nn=r->dim->n, na=put_at->dim->v[0], nb=in->dim->n;
+	if (nn<na) RAISE("stored grid dims < length of put_at list");
+	if (nn<nb) RAISE("stored grid dims < right inlet dims");
 	int32 sizeb[nn];
 	for (int i=0; i<nn; i++) {fromb[i]=0; sizeb[i]=1;}
 	COPY(wdex       ,(int32 *)*put_at   ,put_at->dim->prod());



More information about the Gridflow-cvs mailing list