mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
* Fix to buffer overrun in shader parser from misanthropia
This commit is contained in:
parent
80919a1ce3
commit
7d1b5b4acb
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue