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

Jack Moffitt jack at xiph.org
Wed Apr 24 07:32:42 PDT 2002



jack        02/04/24 07:32:42

  Modified:    src      mp3.c
  Log:
  Jochem Wichers Hoeth caught a signedness problem which could cause reads
  beyond the end of the data buffer.

Revision  Changes    Path
1.2       +1 -1      libshout/src/mp3.c

Index: mp3.c
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/mp3.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mp3.c	2002/01/23 03:08:39	1.1
+++ mp3.c	2002/04/24 14:32:42	1.2
@@ -149,7 +149,7 @@
         /** this is the main loop
         *** we handle everything but the last 4 bytes...
         **/
-	while (pos <= (len - 4)) {
+	while ((pos + 4) <= len) {
                 /* find mp3 header */
                 head = (buff[pos] << 24) | 
                         (buff[pos + 1] << 16) |

<p><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