From bbf6e103b44007165d3116315e62ba2cb43fc391 Mon Sep 17 00:00:00 2001 From: Anton Kindestam Date: Tue, 24 Sep 2019 21:46:52 +0200 Subject: drm_common: add missing zero-initialization of struct vt_mode variable Some fields were being left uninitialized. This could be a problem particularly on non-Linux OS:s with vt_mode (see PR #6976). --- video/out/drm_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video') diff --git a/video/out/drm_common.c b/video/out/drm_common.c index 67d8828d3c..fb02130bb0 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -805,7 +805,7 @@ bool vt_switcher_init(struct vt_switcher *s, struct mp_log *log) return false; } - struct vt_mode vt_mode; + struct vt_mode vt_mode = { 0 }; if (ioctl(s->tty_fd, VT_GETMODE, &vt_mode) < 0) { MP_ERR(s, "VT_GETMODE failed: %s\n", mp_strerror(errno)); return false; -- cgit v1.2.3