[xiph-cvs] cvs commit: ices/src mp3.c

Brendan brendan at xiph.org
Sat Mar 8 20:11:33 PST 2003



brendan     03/03/08 23:11:33

  Modified:    src      mp3.c
  Log:
  Oh my, what a nasty little bug.
  Return the right part of the buffer on large reads please.
  
  This fixes a crash bug I finally figured out how to reproduce. Users,
  commence rejoicing.

Revision  Changes    Path
1.17      +1 -1      ices/src/mp3.c

Index: mp3.c
===================================================================
RCS file: /cvs/ice/ices/src/mp3.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- mp3.c	5 Mar 2003 16:15:44 -0000	1.16
+++ mp3.c	9 Mar 2003 04:11:33 -0000	1.17
@@ -242,7 +242,7 @@
       mp3_data->pos += len;
     } else {
       rlen = mp3_data->len;
-      memcpy (buf, mp3_data->buf, mp3_data->len);
+      memcpy (buf, mp3_data->buf + mp3_data->pos, mp3_data->len);
       mp3_data->len = 0;
       mp3_data->pos = 0;
       free (mp3_data->buf);

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list