mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/dxil: Check null pointer before it is dereferenced (Coverity).
This commit is contained in:
parent
af86cdf713
commit
9cb4372378
Notes:
Alexandre Julliard
2023-12-11 23:20:59 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/517
@ -3202,8 +3202,10 @@ static void sm6_parser_emit_binop(struct sm6_parser *sm6, const struct dxil_reco
|
||||
unsigned int i = 0;
|
||||
|
||||
a = sm6_parser_get_value_by_ref(sm6, record, NULL, &i);
|
||||
if (!a)
|
||||
return;
|
||||
b = sm6_parser_get_value_by_ref(sm6, record, a->type, &i);
|
||||
if (!a || !b)
|
||||
if (!b)
|
||||
return;
|
||||
|
||||
if (!dxil_record_validate_operand_count(record, i + 1, i + 2, sm6))
|
||||
@ -3994,8 +3996,10 @@ static void sm6_parser_emit_cmp2(struct sm6_parser *sm6, const struct dxil_recor
|
||||
}
|
||||
|
||||
a = sm6_parser_get_value_by_ref(sm6, record, NULL, &i);
|
||||
if (!a)
|
||||
return;
|
||||
b = sm6_parser_get_value_by_ref(sm6, record, a->type, &i);
|
||||
if (!a || !b)
|
||||
if (!b)
|
||||
return;
|
||||
|
||||
if (!dxil_record_validate_operand_count(record, i + 1, i + 2, sm6))
|
||||
|
Loading…
x
Reference in New Issue
Block a user