* Fix to buffer overrun in shader parser from misanthropia

This commit is contained in:
Tim Angus 2005-10-19 22:15:51 +00:00
parent 80919a1ce3
commit 7d1b5b4acb

View file

@ -1438,6 +1438,13 @@ static qboolean ParseShader( char **text )
}
stages[s].active = qtrue;
s++;
// 20051019 misantropia -- fix buffer overrun.
if ( s >= MAX_SHADER_STAGES ) {
ri.Printf( PRINT_WARNING, "WARNING: too many stages in shader %s\n", shader.name );
return qfalse;
}
continue;
}
// skip stuff that only the QuakeEdRadient needs