[icecast-dev] FW: libshout

Benninghoff, John John.Benninghoff at Rbcdain.com
Mon Mar 25 15:39:21 PST 2002



Don't know if this has been found/fixed yet, but I uncovered a bug where ices would segfault when a short (len < 4) packet was sent to shout_send_data...

Here is a patch for the version of libshout included with ices-0.2.2; I have tested this and it fixes the problem.

--- libshout/shout.c.orig	Sun May  6 15:47:53 2001
+++ libshout/shout.c	Mon Mar 25 17:20:30 2002
@@ -175,7 +175,7 @@
         /** this is the main loop
         *** we handle everything but the last 4 bytes...
         **/
-	while (pos <= (len - 4)) {
+	while ((pos + 3) < len) {
                 /* find mp3 header */
                 head = (buff[pos] << 24) | 
                        (buff[pos + 1] << 16) |

--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-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 Icecast-dev mailing list