Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
89aabb63 by Jeffrey Knockel at 2024-01-27T14:28:38+00:00
xcb/x11: reject unsupported visual classes

Previously in vlc_xcb_VisualToFormat() we didn't do any depth checking
on visuals unless they are TrueColor or StaticGray. Thus, other visuals
would proceed further through the function and either get accidentally
treated as a TrueColor visual or even hit vlc_assert_unreachable() if
the visual's depth isn't one that we supported.  We now return false on
unsupported visual classes.

- - - - -


1 changed file:

- modules/video_output/xcb/pictures.c


Changes:

=====================================
modules/video_output/xcb/pictures.c
=====================================
@@ -92,6 +92,8 @@ bool vlc_xcb_VisualToFormat(const xcb_setup_t *setup, 
uint_fast8_t depth,
         if (depth != 8)
             return false;
     }
+    else
+        return false; /* unsupported visual class */
 
     const xcb_format_t *fmt = vlc_xcb_DepthToPixmapFormat(setup, depth);
     if (unlikely(fmt == NULL))



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/89aabb63144e5a552869019fe7b7895a60f4763b

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/89aabb63144e5a552869019fe7b7895a60f4763b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to