diff options
Diffstat (limited to 'code/renderer')
-rw-r--r-- | code/renderer/tr_shader.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/code/renderer/tr_shader.c b/code/renderer/tr_shader.c index f628b67..f896f31 100644 --- a/code/renderer/tr_shader.c +++ b/code/renderer/tr_shader.c @@ -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 |