shithub: choc

Download patch

ref: fdf156f819df06f7d7af700ba5bf834516b92a6f
parent: ddb9af112d766cbc56fb7292f23f45a5f9c13edc
author: Simon Howard <[email protected]>
date: Wed Jul 11 17:20:39 EDT 2012

Add bound check for scrolling walls limit and exit with an error if it
is exceeded.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2513

--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -1474,6 +1474,11 @@
 	switch(lines[i].special)
 	{
 	  case 48:
+            if (numlinespecials >= MAXLINEANIMS)
+            {
+                I_Error("Too many scrolling wall linedefs! "
+                        "(Vanilla limit is 32)");
+            }
 	    // EFFECT FIRSTCOL SCROLL+
 	    linespeciallist[numlinespecials] = &lines[i];
 	    numlinespecials++;