mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-03 09:01:40 -05:00
backend/drm: prevent use of uninitialized data
This commit is contained in:
parent
d605b2ea07
commit
fb94f03b43
1 changed files with 3 additions and 0 deletions
|
|
@ -298,6 +298,9 @@ size_t match_obj(size_t num_objs, const uint32_t objs[static restrict num_objs],
|
||||||
size_t num_res, const uint32_t res[static restrict num_res],
|
size_t num_res, const uint32_t res[static restrict num_res],
|
||||||
uint32_t out[static restrict num_res]) {
|
uint32_t out[static restrict num_res]) {
|
||||||
uint32_t solution[num_res];
|
uint32_t solution[num_res];
|
||||||
|
for (size_t i = 0; i < num_res; ++i) {
|
||||||
|
solution[i] = UNMATCHED;
|
||||||
|
}
|
||||||
|
|
||||||
struct match_state st = {
|
struct match_state st = {
|
||||||
.num_objs = num_objs,
|
.num_objs = num_objs,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue