changeset 14535:c920c525daa2

100l, completely broken pointer arithmetic causing crashes.
author reimar
date Wed, 19 Jan 2005 12:12:36 +0000
parents eb1d1e19edf4
children 6f13379b1464
files libmpdemux/demux_ogg.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ogg.c	Tue Jan 18 06:40:02 2005 +0000
+++ b/libmpdemux/demux_ogg.c	Wed Jan 19 12:12:36 2005 +0000
@@ -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)