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

Tobias Diedrich td at informatik.uni-hannover.de
Sat May 18 10:20:04 CEST 2002


A one-liner, subject says it all :-)

-- 
Tobias								PGP: 0x9AC7E0BC
-------------- next part --------------
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));


More information about the MPlayer-dev-eng mailing list