[MPlayer-cvslog] CVS: main/libmpdemux demux_ogg.c,1.62,1.63

Reimar Döffinger CVS syncmail at mplayerhq.hu
Wed Jan 19 13:12:38 CET 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv4226

Modified Files:
	demux_ogg.c 
Log Message:
100l, completely broken pointer arithmetic causing crashes.


Index: demux_ogg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- demux_ogg.c	25 Nov 2004 22:24:00 -0000	1.62
+++ demux_ogg.c	19 Jan 2005 12:12:36 -0000	1.63
@@ -924,7 +924,7 @@
 	sh_a->samplesize = (sh_a->wf->wBitsPerSample+7)/8;
 	sh_a->wf->cbSize = extra_size;
 	if(extra_size > 0)
-	  memcpy(sh_a->wf+sizeof(WAVEFORMATEX),pack.packet+142,extra_size);
+	  memcpy(((char *)sh_a->wf)+sizeof(WAVEFORMATEX),pack.packet+142,extra_size);
 
 	ogg_d->subs[ogg_d->num_sub].samplerate = sh_a->samplerate; // * sh_a->channels;
 	if (identify)
@@ -981,7 +981,7 @@
 	sh_a->samplesize = (sh_a->wf->wBitsPerSample+7)/8;
 	sh_a->wf->cbSize = extra_size;
 	if(extra_size)
-	  memcpy(sh_a->wf+sizeof(WAVEFORMATEX),st+1,extra_size);
+	  memcpy(((char *)sh_a->wf)+sizeof(WAVEFORMATEX),st+1,extra_size);
 
 	ogg_d->subs[ogg_d->num_sub].samplerate = sh_a->samplerate; // * sh_a->channels;
 	if (identify)




More information about the MPlayer-cvslog mailing list