Commit 9cc8c304 authored by Christophe Mutricy's avatar Christophe Mutricy Committed by Rafaël Carré

Avoid integer overflow. Patch by Drew Yao.

parent e6e22cae
......@@ -396,7 +396,8 @@ static int cinepak_decode_frame( cinepak_context_t *p_context,
i_height = GET2BYTES( p_data );
i_frame_strips = GET2BYTES( p_data );
if( !i_frame_size || !i_width || !i_height )
if( !i_frame_size || !i_width || !i_height ||
i_width > 0xffff-3 || i_height > 0xffff-3)
{
/* Broken header */
return( -1 );
......
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