Commit 4b983bd7 authored by Salah-Eddin Shaban's avatar Salah-Eddin Shaban Committed by Jean-Baptiste Kempf

freetype: avoid left shift of negative values

Close #16484
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 75ff8667
......@@ -1495,6 +1495,13 @@ int LayoutText( filter_t *p_filter, line_desc_t **pp_lines,
* and any extra width caused by visual reordering
*/
int i_max_width = ( int ) p_filter->fmt_out.video.i_visible_width - i_max_advance_x;
if( i_max_width <= 0 )
{
msg_Err( p_filter, "LayoutText(): Invalid max width" );
goto error;
}
if( LayoutParagraph( p_filter, p_paragraph,
i_max_width, pp_line, b_grid ) )
goto error;
......
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