summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2018-03-07 21:05:34 -0800
committerEmil Velikov <[email protected]>2018-03-20 16:57:26 +0000
commit582cae39bd59dd54ad089d95ca35f4e48dcb5186 (patch)
tree3f31cd8d1da80c3c6fc77c75160d71858fdfd926 /src/gallium
parent676af78077d58fef0a7afbb472e22cf3a66729ca (diff)
mesa: Don't write to user buffer in glGetTexParameterIuiv on error
With some sets of optimization flags, GCC will generate warnings like this: src/mesa/main/texparam.c:2327:27: warning: ‘*((void *)&ip+12)’ may be used uninitialized in this function [-Wmaybe-uninitialized] params[3] = ip[3]; ~~^~~ src/mesa/main/texparam.c:2320:16: note: ‘*((void *)&ip+12)’ was declared here GLint ip[4]; ^~ ip is not initialized in cases where a GL error is generated. In these cases, we should *not* write to the user's buffer, so this is actually a bug. I wrote a new piglit test gl-3.0-texparameteri to show this bug. I suspect that Coverity also detected this, but the scan site is currently down. Fixes: c2c507786 "main: Added entry points for glGetTextureParameteriv, Iiv, and Iuiv." Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit def0030e64dd3a4eb3487dd40bf64b9a71a70af3)
Diffstat (limited to 'src/gallium')
0 files changed, 0 insertions, 0 deletions