Bug 2435 - Buffer overrun if # stages > MAX_SHADER_STAGES
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Video
Version: 1.33 SVN
Hardware: PC All
: P2 minor
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2005-10-19 17:23 EDT by Ben Noordhuis
Modified: 2007-05-21 11:23:54 EDT
0 users

See Also:



Description Ben Noordhuis 2005-10-19 17:23:49 EDT
Shaders with more than MAX_SHADER_STAGES (8) stages cause a buffer overrun. The
fix is fairly trivial. Apply diff to renderer/tr_shader.c.

1434a1435,1440
>                       // 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;
>                       }
Comment 1 Tim Angus 2005-10-19 18:18:39 EDT
In future, would it be possible to use a unified diff and attach it to the bug
rather than pasting a snippet into the bug description? It makes it a lot easier
to see what's going on.

Thanks.
Comment 2 Ryan C. Gordon 2007-05-21 11:23:54 EDT
Setting a QA contact on all ioquake3 bugs, even resolved ones. Sorry if you get a flood of email from this, it should only happen once. Apologies for the incovenience.

--ryan.