mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
zink: avoid memcmping null pointers
memcmping NULL pointers is not allowed, and would lead to a crash here. So let's check that the first isn't NULL; we've already checked that they're not *both* NULL, so checking one is enough. CID: 1484801, 1484810 Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559>
This commit is contained in:
parent
d3a795b528
commit
75b5f12407
1 changed files with 3 additions and 1 deletions
|
|
@ -336,7 +336,9 @@ equals_gfx_pipeline_state(const void *a, const void *b)
|
|||
if (sa->dyn_state1.front_face != sb->dyn_state1.front_face)
|
||||
return false;
|
||||
if (!!sa->dyn_state1.depth_stencil_alpha_state != !!sb->dyn_state1.depth_stencil_alpha_state ||
|
||||
memcmp(sa->dyn_state1.depth_stencil_alpha_state, sb->dyn_state1.depth_stencil_alpha_state, sizeof(struct zink_depth_stencil_alpha_hw_state)))
|
||||
(sa->dyn_state1.depth_stencil_alpha_state &&
|
||||
memcmp(sa->dyn_state1.depth_stencil_alpha_state, sb->dyn_state1.depth_stencil_alpha_state,
|
||||
sizeof(struct zink_depth_stencil_alpha_hw_state))))
|
||||
return false;
|
||||
}
|
||||
if (!sa->have_EXT_extended_dynamic_state2) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue