mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
i830: Fix stack corruption
Found by compiler warning:
i830_texstate.c:131:28: warning: argument to 'sizeof' in 'memset' call
is the same expression as the destination; did you mean to
dereference it? [-Wsizeof-pointer-memaccess]
memset(state, 0, sizeof(state));
~~~~~ ^~~~~
On 64-bit systems, memset here would write an extra 4 bytes.
Note: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 735070c45b)
This commit is contained in:
parent
a0ea21ff04
commit
c33b752899
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
|
|||
GLubyte border[4];
|
||||
GLuint dst_x, dst_y;
|
||||
|
||||
memset(state, 0, sizeof(state));
|
||||
memset(state, 0, sizeof(*state));
|
||||
|
||||
/*We need to refcount these. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue