--- peercast-0.1217.toots.20060314.orig/debian/libpeercast0.dirs
+++ peercast-0.1217.toots.20060314/debian/libpeercast0.dirs
@@ -0,0 +1 @@
+usr/lib
--- peercast-0.1217.toots.20060314.orig/debian/control
+++ peercast-0.1217.toots.20060314/debian/control
@@ -0,0 +1,58 @@
+Source: peercast
+Section: sound
+Priority: optional
+Maintainer: Romain Beauxis <toots@rastageeks.org>
+Build-Depends: cdbs (>= 0.4.23-1.1), autotools-dev, debhelper (>= 4.2.0), patchutils (>= 0.2.25), gconf2, kdelibs-bin
+Standards-Version: 3.6.2
+
+Package: peercast
+Architecture: any
+Depends: peercast-servent, peercast-handlers
+Description: P2P audio and video streaming server metapackage
+ PeerCast is a fresh new P2P streaming server. It can stream music 
+ and video from a broad variety of formats.
+ .
+ This metapackage installs a full peercast, servent and handlers.
+
+Package: peercast-servent
+Architecture: any
+Depends: ${shlibs:Depends}, logrotate, adduser
+Conflicts: gnome-peercast
+Description: P2P audio and video streaming servent
+ PeerCast is a fresh new P2P streaming server. It can stream music
+ and video from a broad variety of formats.
+ .
+ This package installs peercast's servent daemon.
+
+Package: peercast-handlers
+Architecture: all
+Depends: ${misc:Depends}, xdialog | zenity | kdebase-bin, dialog
+Recommends: konqueror | epiphany | firefox, geekast | xmms | vlc | totem | mp3-player
+Description: P2P audio and video streaming handlers
+ PeerCast is a fresh new P2P streaming server. It can stream music
+ and video from a broad variety of formats.
+ .
+ This package installs handlers for common browsers like
+ Firefox, Konqueror, Epiphany.
+ 
+Package: libpeercast0
+Architecture: any
+Depends: ${shlibs:Depends}
+Section: libs
+Description: P2P audio and video streaming server libraries
+ PeerCast is a fresh new P2P streaming server. It can stream music 
+ and video from a broad variety of formats.
+ .
+ This package provides shared libraries for peercast.
+
+Package: libpeercast0-dev
+Architecture: any
+Depends: libpeercast0 (>= ${Source-Version})
+Section: libdevel
+Description: P2P audio and video streaming server -- development
+ PeerCast is a fresh new P2P streaming server. It can stream music 
+ and video from a broad variety of formats.
+ .
+ This package provides includes header files and static libraries 
+ needed to compile programs using libpeercast.
+
--- peercast-0.1217.toots.20060314.orig/debian/rules
+++ peercast-0.1217.toots.20060314/debian/rules
@@ -0,0 +1,61 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
+# In order to regenerate 'debian/control' :
+#    DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean
+# Then check manually if everything's ok
+
+
+CFLAGS := 
+CXXFLAGS := 
+
+DEB_CONFIGURE_EXTRA_FLAGS := --disable-rpath --disable-schemas-install
+
+# tight versioning
+DEB_NOREVISION_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | \
+    cut -f 2 -d ' ' | cut -f 1 -d '-')
+DEB_DH_MAKESHLIBS_ARGS_libpeercast0 := -V"libpeercast0 \
+   (>= $(DEB_NOREVISION_VERSION))"
+   DEB_SHLIBDEPS_LIBRARY_peercast-servent := libpeercast0
+   DEB_SHLIBDEPS_INCLUDE_peercast-servent := debian/libpeercast0/usr/lib/
+
+install/peercast-servent::
+	cp -rf $(CURDIR)/debian/tmp/usr/sbin/* $(CURDIR)/debian/peercast-servent/usr/sbin
+	cp -rf $(CURDIR)/debian/config/* $(CURDIR)/debian/peercast-servent/usr/share/peercast
+	dh_link -ppeercast-servent usr/share/peercast/peercast.ini.defaults etc/peercast/peercast.ini.default
+	cp -rf $(CURDIR)/debian/tmp/usr/share/peercast/html $(CURDIR)/debian/peercast-servent/usr/share/peercast
+	cp -rf $(CURDIR)/debian/tmp/usr/share/man/man8/peercast.8 $(CURDIR)/debian/peercast-servent/usr/share/man/man8
+
+install/peercast-handlers::
+	cp -rf $(CURDIR)/debian/tmp/usr/lib/firefox/defaults/pref/peercast.js $(CURDIR)/debian/peercast-handlers/etc/peercast/firefox-handler.js
+	dh_link -ppeercast-handlers etc/peercast/firefox-handler.js etc/mozilla-firefox/pref/peercast.js
+	dh_link -ppeercast-handlers etc/peercast/firefox-handler.js usr/lib/mozilla/defaults/pref/peercast.js
+	cp -rf $(CURDIR)/debian/tmp/usr/share/services $(CURDIR)/debian/peercast-handlers/usr/share
+	cp -rf $(CURDIR)/debian/tmp/usr/bin/* $(CURDIR)/debian/peercast-handlers/usr/share/peercast/scripts
+	cp -rf $(CURDIR)/debian/tmp/usr/share/man/man8/peercast-handlers.8 $(CURDIR)/debian/peercast-handlers/usr/share/man/man8
+	find debian/peercast-handlers/usr/share/peercast/scripts -maxdepth 1 -mindepth 1 | while read i; do \
+	dh_link -ppeercast-handlers "`echo "$$i" | sed -e s#debian/peercast-handlers/###`" \
+	"`echo "$$i" | sed -e s#debian/peercast-handlers/usr/share/peercast/scripts/#usr/bin/#`"; \
+	dh_link -ppeercast-handlers "usr/share/man/man8/peercast-handlers.8.gz" \
+	"`echo "$$i" | sed -e s#debian/peercast-handlers/usr/share/peercast/scripts/#usr/share/man/man8/#`.8.gz"; \
+	done
+	cp -rf $(CURDIR)/debian/tmp/etc/gconf/schemas/peercast.schemas $(CURDIR)/debian/peercast-handlers/usr/share/gconf/schemas
+
+binary-install/peercast-handlers::
+	dh_gconf -ppeercast-handlers
+	
+
+install/libpeercast0::
+	cp -rf $(CURDIR)/debian/tmp/usr/lib/*.so.* $(CURDIR)/debian/libpeercast0/usr/lib
+
+install/libpeercast0-dev::
+	cp -rf $(CURDIR)/debian/tmp/usr/include $(CURDIR)/debian/libpeercast0-dev/usr
+	cp -rf $(CURDIR)/debian/tmp/usr/lib/*.a $(CURDIR)/debian/tmp/usr/lib/*.la \
+	$(CURDIR)/debian/tmp/usr/lib/*.so  $(CURDIR)/debian/libpeercast0-dev/usr/lib
+
+clean::
+	rm -rf confdefs.h
+
--- peercast-0.1217.toots.20060314.orig/debian/peercast-servent.postinst
+++ peercast-0.1217.toots.20060314/debian/peercast-servent.postinst
@@ -0,0 +1,73 @@
+#!/bin/sh -e
+
+if ! ([ "$1" = "configure" ] || [ "$1" = "reconfigure" ]); then
+  exit 0
+fi
+
+
+# set some useful variables
+PEERCAST="peercast"
+CHOWN="/bin/chown"
+ADDUSER="/usr/sbin/adduser"
+USERDEL="/usr/sbin/userdel"
+USERADD="/usr/sbin/useradd"
+GROUPDEL="/usr/sbin/groupdel"
+GROUPMOD="/usr/sbin/groupmod"
+ID="/usr/bin/id"
+
+
+###
+# 1. get current peercast uid and gid if user exists.
+set -e
+if $ID $PEERCAST > /dev/null 2>&1; then
+   IUID=`$ID --user $PEERCAST`
+   IGID=`$ID --group $PEERCAST`
+else
+   IUID="NONE"
+   IGID="NONE"
+fi
+
+
+###
+# 2. Ensure that no standard account or group will remain before adding the
+#    new user
+if [ "$IUID" = "NONE" ] || [ $IUID -ge 1000 ]; then # we must do sth :)
+  if ! [ "$IUID" = "NONE" ] && [ $IUID -ge 1000 ]; then
+      # peercast user exists but isn't a system user... delete it.
+      $USERDEL $PEERCAST
+      $GROUPDEL $PEERCAST
+  fi
+
+###
+# 3. Add the system account.
+#    Issue a debconf warning if it fails. 
+  if $GROUPMOD $PEERCAST > /dev/null 2>&1; then 
+    # peercast group already exists, use --ingroup
+    if ! $ADDUSER --system --disabled-password --disabled-login --home /usr/share/peercast --no-create-home --ingroup $PEERCAST $PEERCAST; then
+      echo "The adduser command failed."
+    fi
+  else
+    if ! $ADDUSER --system --disabled-password --disabled-login --home /usr/share/peercast --no-create-home --group $PEERCAST; then
+      echo "The adduser command failed."
+    fi
+  fi
+fi
+set +e
+
+###
+# 4. Add default config file if not any:
+if ! [ -f /etc/peercast/peercast.ini ]; then
+	cp /usr/share/peercast/peercast.ini.default /etc/peercast/peercast.ini
+fi
+
+###
+# 5. change ownership of directory
+$CHOWN -R $PEERCAST:$PEERCAST /usr/share/peercast/
+$CHOWN -R $PEERCAST:$PEERCAST /var/log/peercast/
+$CHOWN -R $PEERCAST:$PEERCAST /etc/peercast/
+$CHOWN -R $PEERCAST:$PEERCAST /var/run/peercast/
+
+
+
+
+#DEBHELPER#
--- peercast-0.1217.toots.20060314.orig/debian/changelog
+++ peercast-0.1217.toots.20060314/debian/changelog
@@ -0,0 +1,77 @@
+peercast (0.1217.toots.20060314-1etch0) stable-security; urgency=high
+
+  * Fixed CVE-2007-6454:
+    | Heap-based buffer overflow in the handshakeHTTP function in servhs.cpp
+    | in PeerCast 0.1217 and earlier, and SVN 344 and earlier, allows remote
+    | attackers to cause a denial of service and possibly execute arbitrary
+    | code via a long SOURCE request.
+    Closes: #457300
+
+ -- Romain Beauxis <toots@rastageeks.org>  Fri, 21 Dec 2007 16:40:20 +0100
+
+peercast (0.1217.toots.20060314-1) unstable; urgency=high
+
+  * New upstream release
+  * Last upstream was not up to date, this one
+  really fixes the security issue.
+
+ -- Romain Beauxis <toots@rastageeks.org>  Tue, 14 Mar 2006 02:55:08 +0200
+
+peercast (0.1217-1) unstable; urgency=high
+
+  * New upstream release, fixes security issue
+  * Corrected gconf schemas installation
+  * Improved handlers package
+
+ -- Romain Beauxis <toots@rastageeks.org>  Sat, 11 Mar 2006 18:59:18 +0200
+
+peercast (0.1216-1) unstable; urgency=high
+
+  * New upstream Release, fixes a security issue
+  * Added handler for the new gnome interface: geekast
+  * Changed schemas and schemas install
+  * Backported patch from BTS (Closes: #345203)
+
+ -- Romain Beauxis <toots@rastageeks.org>  Sat,  4 Mar 2006 13:57:48 +0200
+
+peercast (0.1214.toots.svn20051112-1) unstable; urgency=low
+
+  * New upstream release
+  * Handler improved
+  * Dependencies improved for peercast-handlers
+
+ -- Romain Beauxis <toots@rastageeks.org>  Thu, 17 Nov 2005 04:19:08 +0200
+
+peercast (0.1214.toots.svn20051028-1) unstable; urgency=low
+
+  * New upstream release
+  * Better handling scripts and dependencies
+  * Added conflicts with gnome-peercast - see bug #335960
+
+ -- Romain Beauxis <toots@rastageeks.org>  Fri, 28 Oct 2005 19:36:35 +0200
+
+peercast (0.1214-4) unstable; urgency=low
+
+  * Fix FTBFS for x86_64 
+  * First upload to sid (Closes: #295728)
+
+ -- Romain Beauxis <toots@rastageeks.org>  Tue, 27 Sep 2005 22:11:32 +0200
+
+peercast (0.1214-3) unstable; urgency=low
+
+  * Splited peercast binary package in servent and handlers 
+
+ -- Romain Beauxis <toots@rastageeks.org>  Tue, 27 Sep 2005 12:49:48 +0200
+
+peercast (0.1214-2) unstable; urgency=low
+
+  * Added gnome and firefox support for peercast:// links 
+
+ -- Romain Beauxis <toots@rastageeks.org>  Sat, 24 Sep 2005 16:43:42 +0200
+
+peercast (0.1214-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Romain Beauxis <toots@rastageeks.org>  Mon, 20 Jun 2005 12:14:02 +0200
+
--- peercast-0.1217.toots.20060314.orig/debian/compat
+++ peercast-0.1217.toots.20060314/debian/compat
@@ -0,0 +1 @@
+4
--- peercast-0.1217.toots.20060314.orig/debian/config/peercast.ini.default
+++ peercast-0.1217.toots.20060314/debian/config/peercast.ini.default
@@ -0,0 +1,81 @@
+
+[Server]
+serverPort = 7144
+autoServe = Yes
+forceIP = 
+isRoot = No
+maxBitrateOut = 0
+maxRelays = 1
+maxDirect = 0
+maxRelaysPerChannel = 0
+firewallTimeout = 30
+forceNormal = No
+rootMsg = 
+authType = cookie
+cookiesExpire = session
+htmlPath = html/en
+minPGNUIncoming = 10
+maxPGNUIncoming = 20
+maxServIn = 50
+chanLog = 
+networkID = 00000000000000000000000000000000
+
+[Broadcast]
+broadcastMsgInterval = 10
+broadcastMsg = 
+icyMetaInterval = 8192
+broadcastID = 898145B5C0427118B595AF7D9E110000
+hostUpdateInterval = 180
+maxControlConnections = 3
+rootHost = yp.peercast.org
+
+[Client]
+refreshHTML = 5
+relayBroadcast = 30
+minBroadcastTTL = 1
+maxBroadcastTTL = 7
+pushTries = 5
+pushTimeout = 60
+maxPushHops = 8
+autoQuery = 0
+queryTTL = 7
+
+[Privacy]
+password = 
+maxUptime = 0
+
+[Filter]
+ip = 255.255.255.255
+private = No
+ban = No
+network = Yes
+direct = Yes
+[End]
+
+[Notify]
+PeerCast = Yes
+Broadcasters = Yes
+TrackInfo = Yes
+[End]
+
+[Server1]
+allowHTML = Yes
+allowBroadcast = Yes
+allowNetwork = Yes
+allowDirect = Yes
+[End]
+
+[Server2]
+allowHTML = No
+allowBroadcast = Yes
+allowNetwork = No
+allowDirect = No
+[End]
+
+[Debug]
+logDebug = No
+logErrors = No
+logNetwork = No
+logChannel = No
+pauseLog = No
+idleSleepTime = 10
--- peercast-0.1217.toots.20060314.orig/debian/control.in
+++ peercast-0.1217.toots.20060314/debian/control.in
@@ -0,0 +1,58 @@
+Source: peercast
+Section: sound
+Priority: optional
+Maintainer: Romain Beauxis <toots@rastageeks.org>
+Build-Depends: @cdbs@, gconf2, kdelibs-bin
+Standards-Version: 3.6.2
+
+Package: peercast
+Architecture: any
+Depends: peercast-servent, peercast-handlers
+Description: P2P audio and video streaming server metapackage
+ PeerCast is a fresh new P2P streaming server. It can stream music 
+ and video from a broad variety of formats.
+ .
+ This metapackage installs a full peercast, servent and handlers.
+
+Package: peercast-servent
+Architecture: any
+Depends: ${shlibs:Depends}, logrotate, adduser
+Conflicts: gnome-peercast
+Description: P2P audio and video streaming servent
+ PeerCast is a fresh new P2P streaming server. It can stream music
+ and video from a broad variety of formats.
+ .
+ This package installs peercast's servent daemon.
+
+Package: peercast-handlers
+Architecture: all
+Depends: ${misc:Depends}, xdialog | zenity | kdebase-bin, dialog
+Recommends: konqueror | epiphany | firefox, geekast | xmms | vlc | totem | mp3-player
+Description: P2P audio and video streaming handlers
+ PeerCast is a fresh new P2P streaming server. It can stream music
+ and video from a broad variety of formats.
+ .
+ This package installs handlers for common browsers like
+ Firefox, Konqueror, Epiphany.
+ 
+Package: libpeercast0
+Architecture: any
+Depends: ${shlibs:Depends}
+Section: libs
+Description: P2P audio and video streaming server libraries
+ PeerCast is a fresh new P2P streaming server. It can stream music 
+ and video from a broad variety of formats.
+ .
+ This package provides shared libraries for peercast.
+
+Package: libpeercast0-dev
+Architecture: any
+Depends: libpeercast0 (>= ${Source-Version})
+Section: libdevel
+Description: P2P audio and video streaming server -- development
+ PeerCast is a fresh new P2P streaming server. It can stream music 
+ and video from a broad variety of formats.
+ .
+ This package provides includes header files and static libraries 
+ needed to compile programs using libpeercast.
+
--- peercast-0.1217.toots.20060314.orig/debian/peercast-servent.logrotate
+++ peercast-0.1217.toots.20060314/debian/peercast-servent.logrotate
@@ -0,0 +1,11 @@
+/var/log/peercast/*.log {
+  weekly
+  missingok
+  rotate 7
+  compress
+  delaycompress
+  copy
+  postrotate
+        /usr/bin/killall -HUP peercast
+  endscript
+} 
--- peercast-0.1217.toots.20060314.orig/debian/peercast-servent.dirs
+++ peercast-0.1217.toots.20060314/debian/peercast-servent.dirs
@@ -0,0 +1,7 @@
+usr/sbin
+usr/share/peercast
+usr/share/man/man8
+etc/peercast
+etc/init.d
+var/log/peercast
+var/run/peercast
--- peercast-0.1217.toots.20060314.orig/debian/peercast-servent.init
+++ peercast-0.1217.toots.20060314/debian/peercast-servent.init
@@ -0,0 +1,70 @@
+#! /bin/sh
+#
+# Peercast init start/stop script.
+#
+# Based on debian skeleton init script
+#
+
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/peercast
+NAME=peercast
+DESC="Peercast peer to peer broadcasting"
+USERID=peercast
+PIDDIR=/var/run/peercast
+PIDFILE=$PIDDIR/peercast.pid
+LOGDIR=/var/log/peercast
+CONFDIR=/etc/peercast
+HTMLPATH=/usr/share/peercast
+OPTIONS="--inifile $CONFDIR/peercast.ini --pidfile $PIDFILE --logfile $LOGDIR/peercast.log --path $HTMLPATH --daemon"
+
+# Check for log dir
+if [ ! -d $LOGDIR ] ; then
+	mkdir $LOGDIR
+	chown $USERID:$USERID $LOGDIR
+fi
+
+# Check for pid dir
+if [ ! -d $PIDDIR ] ; then
+	mkdir $PIDDIR
+	chown $USERID:$USERID $PIDDIR
+fi
+
+# Check for conf dir
+if [ ! -d $CONFDIR ] ; then
+	mkdir $CONFDIR
+	chown $USERID:$USERID $LOGDIR
+fi
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+  start)
+        echo -n "Starting $DESC: "
+        start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USERID:$USERID       \
+        --exec $DAEMON -- $OPTIONS
+	echo "$NAME."
+        ;;
+  stop)
+        echo -n "Stopping $DESC: "
+        start-stop-daemon --stop --quiet --pidfile $PIDFILE --chuid $USERID:$USERID       \
+        --exec $DAEMON
+	echo "Stopped."
+        ;;
+  restart|force-reload|reload)
+        $0 stop
+	sleep 1
+        $0 start
+        ;;
+  *)
+        N=/etc/init.d/$NAME
+        echo "Usage: $N {start|stop|restart}" >&2
+        exit 1
+        ;;
+esac
+
+
+exit 0 
--- peercast-0.1217.toots.20060314.orig/debian/libpeercast0-dev.dirs
+++ peercast-0.1217.toots.20060314/debian/libpeercast0-dev.dirs
@@ -0,0 +1,2 @@
+usr/include/peercast
+usr/lib
--- peercast-0.1217.toots.20060314.orig/debian/patches/01-fix-for-FTBFS-on-kfreeBSD.patch
+++ peercast-0.1217.toots.20060314/debian/patches/01-fix-for-FTBFS-on-kfreeBSD.patch
@@ -0,0 +1,22 @@
+--- peercast-0.1216.orig/core/unix/usocket.cpp	2006-03-04 13:39:50.000000000 +0100
++++ peercast-0.1216/core/unix/usocket.cpp	2006-03-04 14:06:26.000000000 +0100
+@@ -31,7 +31,6 @@
+ 
+ #ifdef __APPLE__ 
+ #include <netinet/in_systm.h> // for n_long definition
+-#define MSG_NOSIGNAL 0        // doesn't seem to be defined under OS X
+ #endif
+ 
+ #include <netinet/ip.h>
+@@ -40,6 +39,11 @@
+ #define INVALID_SOCKET -1
+ #define SOCKET_ERROR -1
+ 
++#ifndef MSG_NOSIGNAL
++#define MSG_NOSIGNAL 0
++#endif
++
++
+ // --------------------------------------------------
+ void UClientSocket::init()
+ {
--- peercast-0.1217.toots.20060314.orig/debian/patches/02-CVE-2007-6454.patch
+++ peercast-0.1217.toots.20060314/debian/patches/02-CVE-2007-6454.patch
@@ -0,0 +1,99 @@
+--- peercast-0.1217.toots.20060314.orig/core/common/servhs.cpp	2007-12-25 14:44:25.000000000 +0100
++++ peercast-0.1217.toots.20060314/core/common/servhs.cpp	2007-12-25 14:49:17.000000000 +0100
+@@ -313,13 +313,13 @@
+ 					mount[-1] = 0; // password preceeds
+ 					break;
+ 				}
+-			strcpy(loginPassword,in+7);
++			loginPassword.set(in+7);
+ 			
+-			LOG_DEBUG("ICY client: %s %s",loginPassword,mount?mount:"unknown");
++			LOG_DEBUG("ICY client: %s %s",loginPassword.cstr(),mount?mount:"unknown");
+ 		}
+ 
+ 		if (mount)
+-			strcpy(loginMount,mount);
++			loginMount.set(mount);
+ 
+ 		handshakeICY(Channel::SRC_ICECAST,isHTTP);
+ 		sock = NULL;	// socket is taken over by channel, so don`t close it
+@@ -329,7 +329,7 @@
+ 		if (!isAllowed(ALLOW_BROADCAST))
+ 			throw HTTPException(HTTP_SC_UNAVAILABLE,503);
+ 
+-		strcpy(loginPassword,servMgr->password);	// pwd already checked
++		loginPassword.set(servMgr->password);	// pwd already checked
+ 
+ 		sock->writeLine("OK2");
+ 		sock->writeLine("icy-caps:11");
+@@ -842,6 +842,8 @@
+ 					// connections
+ 					else if (strcmp(curr,"maxcin")==0)
+ 						servMgr->maxControl = getCGIargINT(arg);
++                                       else if (strcmp(curr,"maxsin")==0)
++                                               servMgr->maxServIn = getCGIargINT(arg);
+ 
+ 					else if (strcmp(curr,"maxup")==0)
+ 						servMgr->maxBitrateOut = getCGIargINT(arg);
+@@ -1499,13 +1501,13 @@
+ 	while (http.nextHeader())
+ 	{
+ 		LOG_DEBUG("ICY %s",http.cmdLine);
+-		readICYHeader(http,info,loginPassword);
++		readICYHeader(http,info,loginPassword.cstr());
+ 	}
+ 
+ 
+ 		
+ 	// check password before anything else, if needed
+-	if (strcmp(servMgr->password,loginPassword)!=0)
++	if (loginPassword != servMgr->password)
+ 	{
+ 		if (!sock->host.isLocalhost() || strlen(loginPassword))
+ 			throw HTTPException(HTTP_SC_UNAUTHORIZED,401);
+@@ -1521,7 +1523,7 @@
+ 
+ 
+ 	info.id = chanMgr->broadcastID;
+-	info.id.encode(NULL,info.name.cstr(),loginMount,info.bitrate);
++	info.id.encode(NULL,info.name.cstr(),loginMount.cstr(),info.bitrate);
+ 
+ 	LOG_DEBUG("Incoming source: %s : %s",info.name.cstr(),ChanInfo::getTypeStr(info.contentType));
+ 
+@@ -1542,7 +1544,7 @@
+ 	info.comment = chanMgr->broadcastMsg;
+ 	info.bcID = chanMgr->broadcastID;
+ 
+-	c = chanMgr->createChannel(info,loginMount);
++	c = chanMgr->createChannel(info,loginMount.cstr());
+ 	if (!c)
+ 		throw HTTPException(HTTP_SC_UNAVAILABLE,503);
+ 
+--- peercast-0.1217.toots.20060314.orig/core/common/servent.cpp	2007-12-25 14:44:25.000000000 +0100
++++ peercast-0.1217.toots.20060314/core/common/servent.cpp	2007-12-25 14:45:22.000000000 +0100
+@@ -184,8 +184,11 @@
+ 	nsSwitchNum = 0;
+ 	pack.func = 255;
+ 	lastConnect = lastPing = lastPacket = 0;
+-	loginPassword[0] = 0;
+-	loginMount[0] = 0;
++
++	loginPassword.clear();
++	loginMount.clear();
++
++
+ 	bytesPerSecond = 0;
+ 	priorityConnect = false;
+ 	pushSock = NULL;
+--- peercast-0.1217.toots.20060314.orig/core/common/servent.h	2007-12-25 14:44:25.000000000 +0100
++++ peercast-0.1217.toots.20060314/core/common/servent.h	2007-12-25 14:45:22.000000000 +0100
+@@ -253,8 +253,7 @@
+ 	ThreadInfo	thread;
+ 
+ 
+-	char	loginPassword[64];
+-	char	loginMount[64];
++	String	loginPassword,loginMount;
+ 
+ 	bool	priorityConnect;
+ 	bool	addMetadata;
--- peercast-0.1217.toots.20060314.orig/debian/copyright
+++ peercast-0.1217.toots.20060314/debian/copyright
@@ -0,0 +1,15 @@
+This package was debianized by Romain Beauxis <toots@rastageeks.org> on
+Fri, 13 May 2005 12:01:24 +0100.
+
+It was downloaded from http://www.peercast.org/code/
+
+Copyright:
+
+(c) 2002-2005 PeerCast.org <code@peercast.org>
+
+License:
+
+You are free to distribute this software under the terms of
+the GNU General Public License.
+On Debian systems, the complete text of the GNU General Public
+License can be found in the file `/usr/share/common-licenses/GPL'.
--- peercast-0.1217.toots.20060314.orig/debian/peercast-handlers.postinst
+++ peercast-0.1217.toots.20060314/debian/peercast-handlers.postinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+#  postinst script to remove old config file
+if [ "$1" = "configure" ]; then 
+	rm -rf /etc/gconf/gconf.xml.defaults/desktop/gnome/url-handlers/peercast/%gconf.xml
+fi
+
+#DEBHELPER#
--- peercast-0.1217.toots.20060314.orig/debian/peercast-handlers.dirs
+++ peercast-0.1217.toots.20060314/debian/peercast-handlers.dirs
@@ -0,0 +1,8 @@
+usr/bin
+usr/share/peercast/scripts 
+usr/share/man/man8
+usr/share/gconf/schemas
+usr/lib/mozilla/defaults/pref
+etc/mozilla-firefox/pref
+etc/peercast
+etc
