[Gridflow-cvs] [svn] commit: r4195 - /trunk/format/videodev.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Sat Aug 15 20:06:07 EDT 2009


Author: matju
Date: Sat Aug 15 20:06:06 2009
New Revision: 4195

Log:
fixed rare buffer overflow bug (never actually encountered it)

Modified:
    trunk/format/videodev.c

Modified: trunk/format/videodev.c
==============================================================================
--- trunk/format/videodev.c (original)
+++ trunk/format/videodev.c Sat Aug 15 20:06:06 2009
@@ -574,7 +574,7 @@
 		dealloc_image();
 		use_mmap = true;
 		alloc_image();
-		queuemax=min(queuemax,vmbuf.frames);
+		queuemax=min(8,min(queuemax,vmbuf.frames));
 		post("transfer mmap with queuemax=%d (max max is vmbuf.frames=%d)", queuemax,vmbuf.frames);
 		this->queuemax=queuemax;
 	} else RAISE("don't know that transfer mode");



More information about the Gridflow-cvs mailing list