Commit a9d773c1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Assert that allocate object size makes sense

parent 4772289d
...@@ -112,6 +112,7 @@ void *vlc_custom_create( vlc_object_t *p_this, size_t i_size, ...@@ -112,6 +112,7 @@ void *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
} }
else else
{ {
assert (i_size >= sizeof (vlc_object_t));
p_priv = calloc( 1, sizeof( *p_priv ) + i_size ); p_priv = calloc( 1, sizeof( *p_priv ) + i_size );
if( p_priv == NULL ) if( p_priv == NULL )
return NULL; return 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