[vlc-devel] commit: Check malloc return value. ( Rémi Duraffort )

Jean-Paul Saman jean-paul.saman at planet.nl
Wed Mar 12 08:26:33 CET 2008


git version control wrote:
> vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Mar 11 20:42:28 2008 +0100| [da686e46efe4a3085c7aa9286e0b2d55dbd1e918]
> 
> Check malloc return value.

Please use VLC_ENOMEM iso VLC_EGENERIC

Gtz
Jean-Paul Saman
> 
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=da686e46efe4a3085c7aa9286e0b2d55dbd1e918
> ---
> 
>  modules/demux/rawvid.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/modules/demux/rawvid.c b/modules/demux/rawvid.c
> index 9a9b0e5..add4213 100644
> --- a/modules/demux/rawvid.c
> +++ b/modules/demux/rawvid.c
> @@ -165,6 +165,9 @@ static int Open( vlc_object_t * p_this )
>      p_demux->pf_demux   = Demux;
>      p_demux->pf_control = Control;
>      p_demux->p_sys      = p_sys = malloc( sizeof( demux_sys_t ) );
> +    if( !p_sys )
> +        return VLC_EGENERIC;
> +
>      p_sys->i_pcr = 1;
>  
>      p_sys->b_y4m = b_y4m;
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel




More information about the vlc-devel mailing list