[vlc-devel] [PATCH 2/3] [mux/ogg] Fix calculation with uninitialized value

Laurent Aimar fenrir at via.ecp.fr
Tue Nov 4 18:36:16 CET 2008


On Tue, Nov 04, 2008, davidf+nntp at woaf.net wrote:
> diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
> index e9dd721..d750426 100644
> --- a/modules/mux/ogg.c
> +++ b/modules/mux/ogg.c
> @@ -320,7 +320,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
>  
>      msg_Dbg( p_mux, "adding input" );
>  
> -    p_input->p_sys = p_stream = malloc( sizeof( ogg_stream_t ) );
> +    p_input->p_sys = p_stream = calloc( 1, sizeof( ogg_stream_t ) );
>      if( !p_stream )
>          return VLC_ENOMEM;
 Which paramater is uninitialied otherwise ? And is 0 the right default
value for it ?

-- 
fenrir



More information about the vlc-devel mailing list