aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-04 22:50:59 +0200
committeremersion <contact@emersion.fr>2018-09-04 22:50:59 +0200
commitfb94f03b4388dd50bf908a1a0ab3d3eeccb8b1ad (patch)
tree86234e4e6238825d38f5cfaf33c5f19b52e19e5c /backend/drm
parentd605b2ea077f00dfa343e824610fad0c01232fbd (diff)
backend/drm: prevent use of uninitialized data
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/drm/util.c b/backend/drm/util.c
index 66819c96..4681f85a 100644
--- a/backend/drm/util.c
+++ b/backend/drm/util.c
@@ -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],
uint32_t out[static restrict num_res]) {
uint32_t solution[num_res];
+ for (size_t i = 0; i < num_res; ++i) {
+ solution[i] = UNMATCHED;
+ }
struct match_state st = {
.num_objs = num_objs,