Skip to content
Commit 0a2e4b02 authored by Tapani Pälli's avatar Tapani Pälli Committed by Dylan Baker
Browse files

mesa: return NULL if we exceed MaxColorAttachments in get_fb_attachment



This fixes invalid access to Attachment array which would occur if caller
would exceed MaxColorAttachments. In practice this should not ever happen
because DiscardFramebufferEXT specifies only GL_COLOR_ATTACHMENT0 to be
valid and InvalidateFramebuffer will error out before but this should
make coverity happy.

v2: const, remove _EXT (Ian)

CID: 1442559
Fixes: 0c42b5f3 "mesa: wire up InvalidateFramebuffer"
Signed-off-by: default avatarTapani Pälli <tapani.palli@intel.com>
Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 9762a9f8)
parent c7fc61d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment