Commit 2c541dcd authored by François Cartegnie's avatar François Cartegnie 🤞

text_renderer: reject incorrect pixbuf

potential read overflow
parent 828490b9
......@@ -265,7 +265,9 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
i_width = gdk_pixbuf_get_width( p_svg->p_rendition );
i_height = gdk_pixbuf_get_height( p_svg->p_rendition );
if( gdk_pixbuf_get_colorspace( p_svg->p_rendition ) != GDK_COLORSPACE_RGB )
if( gdk_pixbuf_get_colorspace( p_svg->p_rendition ) != GDK_COLORSPACE_RGB ||
gdk_pixbuf_get_has_alpha( p_svg->p_rendition ) != TRUE ||
gdk_pixbuf_get_bits_per_sample( p_svg->p_rendition ) != 8 )
{
g_object_unref( p_svg->p_rendition );
p_svg->p_rendition = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment