[MPlayer-dev-eng] PATCH: fix segfault due to unitialized struct in ao_nas

pl p_l at gmx.fr
Sat May 18 11:07:59 CEST 2002


On Sat, May 18, 2002 at 10:20:04AM +0200, Tobias Diedrich wrote:
> A one-liner, subject says it all :-)
Committed.
Thanks.

> Index: main/libao2/ao_nas.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libao2/ao_nas.c,v
> retrieving revision 1.4
> diff -u -r1.4 ao_nas.c
> --- main/libao2/ao_nas.c	22 Apr 2002 22:33:06 -0000	1.4
> +++ main/libao2/ao_nas.c	18 May 2002 08:27:38 -0000
> @@ -320,6 +320,7 @@
>  	char *server;
>  
>  	nas_data=malloc(sizeof(struct ao_nas_data));
> +	memset(nas_data, 0, sizeof(struct ao_nas_data));
>  
>  	printf("ao2: %d Hz  %d chans  %s\n",rate,channels,
>  		audio_out_format_name(format));

-- 
Best regards,
  pl



More information about the MPlayer-dev-eng mailing list