Leif Jackson
2006-Jul-22 22:31 UTC
[Icecast-dev] Possible Minor bug found in current 2.3.1 release of icecast2
I am new to your lists but I have found something in icecast 2.3.1 that may need further review. there is a segfault when you have a failover mount point and the failover mount is using ezstream and you restart ices-2.x and the clients fail back. found via gdb. Very short diff to format.c line 104 below. diff -urNab icecast-2.3.1.orig/src/format.c icecast-2.3.1/src/format.c --- icecast-2.3.1.orig/src/format.c 2006-07-23 00:48:16.418444051 -0400 +++ icecast-2.3.1/src/format.c 2006-07-20 22:38:30.000000000 -0400 @@ -101,7 +101,7 @@ long size = 0; refbuf = source->burst_point; size = client->intro_offset; - while ((size > 0) && refbuf->next) + while ((size > 0) && (refbuf != NULL) && refbuf->next) { size -= refbuf->len; refbuf = refbuf->next; This fixed the segfaulting issue for me, wanted to send it to the devel list. Thanks, Leif
Karl Heyes
2006-Jul-23 05:11 UTC
[Icecast-dev] Possible Minor bug found in current 2.3.1 release of icecast2
Leif Jackson wrote:> I am new to your lists but I have found something in icecast 2.3.1 that > may need further review. there is a segfault when you have a failover > mount point and the failover mount is using ezstream and you restart > ices-2.x and the clients fail back. found via gdb. Very short diff to > format.c line 104 below. > > diff -urNab icecast-2.3.1.orig/src/format.c icecast-2.3.1/src/format.c > --- icecast-2.3.1.orig/src/format.c 2006-07-23 00:48:16.418444051 -0400 > +++ icecast-2.3.1/src/format.c 2006-07-20 22:38:30.000000000 -0400 > @@ -101,7 +101,7 @@ > long size = 0; > refbuf = source->burst_point; > size = client->intro_offset; > - while ((size > 0) && refbuf->next) > + while ((size > 0) && (refbuf != NULL) && refbuf->next) > { > size -= refbuf->len; > refbuf = refbuf->next; > > > This fixed the segfaulting issue for me, wanted to send it to the devel list.Yes this is a bug and you have the right fix, this has been fixed in my branch but not merged into trunk yet. And yes it does affect 2.3.1. karl.