Skip to content
Snippets Groups Projects
Commit 89aabb63 authored by Jeffrey Knockel's avatar Jeffrey Knockel Committed by Steve Lhomme
Browse files

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.
parent ccee256f
No related branches found
No related tags found
1 merge request!4833xcb/x11: reject unsupported visual classes
Pipeline #431364 passed with stages
in 30 minutes and 23 seconds
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment