xvimagesink: Zero initialize mask array
authorJan Schmidt <jan@centricular.com>
Fri, 30 Sep 2022 18:49:16 +0000 (04:49 +1000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 3 Oct 2022 17:30:51 +0000 (17:30 +0000)
Clear the stack array before setting bits to pass to
XISelectEvents(). Fixes spurious crash from an X error:

X Error of failed request:  BadValue (integer parameter out of range for operation)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3100>

subprojects/gst-plugins-base/sys/xvimage/xvcontext.c

index 8579709..fbaee4e 100644 (file)
@@ -1228,7 +1228,7 @@ gst_xwindow_set_event_handling (GstXWindow * window, gboolean handle_events)
 #ifdef HAVE_XI2
     if (context->use_xi2) {
       XIEventMask mask_data;
-      unsigned char mask[2];
+      unsigned char mask[2] = { 0, };
 
       gst_xwindow_select_touch_events (context, window);