mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 04:12:39 +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