[Mplayer-cvslog] CVS: main/libao2 ao_pcm.c,1.13,1.14
Arpi of Ize
arpi at mplayerhq.hu
Wed Jan 29 13:22:05 CET 2003
- Previous message: [Mplayer-cvslog] CVS: main configure,1.645,1.646
- Next message: [Mplayer-cvslog] CVS: main/DOCS/Hungarian documentation.html,1.186,1.187 encoding.html,1.45,1.46 formats.html,1.31,1.32 sound.html,1.41,1.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libao2
In directory mail:/var/tmp.root/cvs-serv15585
Modified Files:
ao_pcm.c
Log Message:
double free(), found by Olivier Galibert <galibert at pobox.com>
Index: ao_pcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_pcm.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ao_pcm.c 19 Jan 2003 16:49:02 -0000 1.13
+++ ao_pcm.c 29 Jan 2003 12:22:00 -0000 1.14
@@ -77,9 +77,7 @@
static int init(int rate,int channels,int format,int flags){
int bits;
if(!ao_outputfilename) {
- ao_outputfilename = (char *) malloc(sizeof(char) * 14);
- strcpy(ao_outputfilename,
- (ao_pcm_waveheader ? "audiodump.wav" : "audiodump.pcm"));
+ ao_outputfilename = strdup(ao_pcm_waveheader ? "audiodump.wav" : "audiodump.pcm");
}
/* bits is only equal to format if (format == 8) or (format == 16);
@@ -138,7 +136,6 @@
fwrite(&wavhdr,sizeof(wavhdr),1,fp);
}
fclose(fp);
- free(ao_outputfilename);
}
// stop playing and empty buffers (for seeking/pause)
- Previous message: [Mplayer-cvslog] CVS: main configure,1.645,1.646
- Next message: [Mplayer-cvslog] CVS: main/DOCS/Hungarian documentation.html,1.186,1.187 encoding.html,1.45,1.46 formats.html,1.31,1.32 sound.html,1.41,1.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list