From fdf156f819df06f7d7af700ba5bf834516b92a6f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 11 Jul 2012 21:20:39 +0000 Subject: Add bound check for scrolling walls limit and exit with an error if it is exceeded. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2513 --- src/p_spec.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/p_spec.c b/src/p_spec.c index 90d0bb7c..5f4853a1 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1474,6 +1474,11 @@ void P_SpawnSpecials (void) 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++; -- cgit v1.2.3