diff -urN ../esphyb-1.0.5/RELNOTES ./RELNOTES
--- ../esphyb-1.0.5/RELNOTES	2010-01-06 19:55:49.000000000 -0500
+++ ./RELNOTES	2010-01-27 21:39:56.000000000 -0500
@@ -1,3 +1,6 @@
+-- esphyb 1.0.6 RELNOTES
+o) fix CVE-2009-4016 - remove clean_string
+
 -- esphyb 1.0.5 RELNOTES
 o) add 'z' to CHANMODES
 o) Prevent invites from overriding bans per RFC1459 and a segfault in 1.0.4
@@ -173,5 +176,5 @@
 Other files recommended for reading: BUGS, README.FIRST, INSTALL
 
 --------------------------------------------------------------------------------
-$Id: RELNOTES 304 2010-01-07 00:55:49Z srees $
+$Id: RELNOTES 314 2010-01-28 02:39:56Z srees $
 $Hybrid: RELNOTES 858 2007-02-28 04:15:47Z lusky $
diff -urN ../esphyb-1.0.5/contrib/spy_links_notice.c ./contrib/spy_links_notice.c
--- ../esphyb-1.0.5/contrib/spy_links_notice.c	2008-11-09 01:10:14.000000000 -0500
+++ ./contrib/spy_links_notice.c	2010-01-27 21:14:42.000000000 -0500
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: spy_links_notice.c 164 2008-11-09 06:10:14Z srees $
+ *  $Id: spy_links_notice.c 313 2010-01-28 02:14:42Z srees $
  *  $Hybrid: spy_links_notice.c 33 2005-10-02 20:50:00Z knight $
  */
 
@@ -51,7 +51,7 @@
     uninstall_hook(links_cb, show_links);
 }
 
-const char *_version = "$Revision: 164 $";
+const char *_version = "$Revision: 313 $";
 
 static void *
 show_links(va_list args)
@@ -62,8 +62,7 @@
 
   if (IsClient(source_p))
     sendto_realops_flags(UMODE_SPY, L_ALL,
-                         "LINKS '%s' requested by %s (%s@%s) [%s]",
-                         parv[1] ? parv[1] : "", source_p->name,
+                         "LINKS requested by %s (%s@%s) [%s]",
 			 source_p->username, source_p->host,
 			 source_p->servptr->name);
 
diff -urN ../esphyb-1.0.5/esphyb-1.0.6.diff ./esphyb-1.0.6.diff
--- ../esphyb-1.0.5/esphyb-1.0.6.diff	1969-12-31 19:00:00.000000000 -0500
+++ ./esphyb-1.0.6.diff	2010-05-04 22:43:04.045588761 -0400
@@ -0,0 +1,48 @@
+diff -urN ../esphyb-1.0.5/RELNOTES ./RELNOTES
+--- ../esphyb-1.0.5/RELNOTES	2010-01-06 19:55:49.000000000 -0500
++++ ./RELNOTES	2010-01-27 21:39:56.000000000 -0500
+@@ -1,3 +1,6 @@
++-- esphyb 1.0.6 RELNOTES
++o) fix CVE-2009-4016 - remove clean_string
++
+ -- esphyb 1.0.5 RELNOTES
+ o) add 'z' to CHANMODES
+ o) Prevent invites from overriding bans per RFC1459 and a segfault in 1.0.4
+@@ -173,5 +176,5 @@
+ Other files recommended for reading: BUGS, README.FIRST, INSTALL
+ 
+ --------------------------------------------------------------------------------
+-$Id: RELNOTES 304 2010-01-07 00:55:49Z srees $
++$Id: RELNOTES 314 2010-01-28 02:39:56Z srees $
+ $Hybrid: RELNOTES 858 2007-02-28 04:15:47Z lusky $
+diff -urN ../esphyb-1.0.5/contrib/spy_links_notice.c ./contrib/spy_links_notice.c
+--- ../esphyb-1.0.5/contrib/spy_links_notice.c	2008-11-09 01:10:14.000000000 -0500
++++ ./contrib/spy_links_notice.c	2010-01-27 21:14:42.000000000 -0500
+@@ -19,7 +19,7 @@
+  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+  *  USA
+  *
+- *  $Id: spy_links_notice.c 164 2008-11-09 06:10:14Z srees $
++ *  $Id: spy_links_notice.c 313 2010-01-28 02:14:42Z srees $
+  *  $Hybrid: spy_links_notice.c 33 2005-10-02 20:50:00Z knight $
+  */
+ 
+@@ -51,7 +51,7 @@
+     uninstall_hook(links_cb, show_links);
+ }
+ 
+-const char *_version = "$Revision: 164 $";
++const char *_version = "$Revision: 313 $";
+ 
+ static void *
+ show_links(va_list args)
+@@ -62,8 +62,7 @@
+ 
+   if (IsClient(source_p))
+     sendto_realops_flags(UMODE_SPY, L_ALL,
+-                         "LINKS '%s' requested by %s (%s@%s) [%s]",
+-                         parv[1] ? parv[1] : "", source_p->name,
++                         "LINKS requested by %s (%s@%s) [%s]",
+ 			 source_p->username, source_p->host,
+ 			 source_p->servptr->name);
+ 
diff -urN ../esphyb-1.0.5/include/irc_string.h ./include/irc_string.h
--- ../esphyb-1.0.5/include/irc_string.h	2009-12-10 19:36:37.000000000 -0500
+++ ./include/irc_string.h	2010-01-27 21:14:42.000000000 -0500
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: irc_string.h 269 2009-12-11 00:36:37Z srees $
+ *  $Id: irc_string.h 313 2010-01-28 02:14:42Z srees $
  *  $Hybrid: irc_string.h 633 2006-06-01 12:30:29Z db $
  */
 
@@ -100,12 +100,6 @@
 #endif
 
 /*
- * clean_string - cleanup control and high ascii characters
- * -Dianora
- */
-extern char *clean_string(char *, const unsigned char *, size_t);
-
-/*
  * strip_tabs - convert tabs to spaces
  * - jdc
  */
diff -urN ../esphyb-1.0.5/modules/m_links.c ./modules/m_links.c
--- ../esphyb-1.0.5/modules/m_links.c	2009-11-03 18:15:42.000000000 -0500
+++ ./modules/m_links.c	2010-01-27 21:14:42.000000000 -0500
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_links.c 251 2009-11-03 23:15:42Z srees $
+ *  $Id: m_links.c 313 2010-01-28 02:14:42Z srees $
  *  $Hybrid: m_links.c 575 2006-05-01 11:41:09Z michael $
  */
 
@@ -49,7 +49,7 @@
 };
 
 #ifndef STATIC_MODULES
-const char *_version = "$Revision: 251 $";
+const char *_version = "$Revision: 313 $";
 static struct Callback *links_cb;
 
 static void *
@@ -84,15 +84,11 @@
 {
   if (IsOper(source_p) || !ConfigServerHide.flatten_links)
   {
-    char *mask = (parc > 2 ? parv[2] : parv[1]);
+    const char *mask = (parc > 2 ? parv[2] : parv[1]);
     const char *me_name, *nick, *p;
     struct Client *target_p;
-    char clean_mask[2 * HOSTLEN + 4];
     dlink_node *ptr;
 
-    if (!EmptyString(mask))    /* only necessary if there is a mask */
-      mask = collapse(clean_string(clean_mask, (const unsigned char*) mask, 2 * HOSTLEN));
-
     me_name = ID_or_name(&me, source_p->from);
     nick = ID_or_name(source_p, source_p->from);
 
diff -urN ../esphyb-1.0.5/newvers.sh ./newvers.sh
--- ../esphyb-1.0.5/newvers.sh	2010-01-05 23:13:48.000000000 -0500
+++ ./newvers.sh	2010-01-27 21:39:56.000000000 -0500
@@ -5,7 +5,7 @@
 
 MAJOR=1
 MINOR=0
-PATCH=5
+PATCH=6
 
 PATCHLEVEL="${MAJOR}.${MINOR}.${PATCH}"
 
diff -urN ../esphyb-1.0.5/src/irc_string.c ./src/irc_string.c
--- ../esphyb-1.0.5/src/irc_string.c	2009-12-10 19:36:37.000000000 -0500
+++ ./src/irc_string.c	2010-01-27 21:14:42.000000000 -0500
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: irc_string.c 269 2009-12-11 00:36:37Z srees $
+ *  $Id: irc_string.c 313 2010-01-28 02:14:42Z srees $
  *  $Hybrid: irc_string.c 593 2006-05-12 05:47:32Z michael $
  */
 
@@ -71,46 +71,6 @@
 }
 
 /*
- * clean_string - clean up a string possibly containing garbage
- *
- * *sigh* Before the kiddies find this new and exciting way of 
- * annoying opers, lets clean up what is sent to local opers
- * -Dianora
- */
-char *
-clean_string(char* dest, const unsigned char* src, size_t len)
-{
-  char* d    = dest; 
-  assert(0 != dest);
-  assert(0 != src);
-
-  if(dest == NULL || src == NULL)
-    return NULL;
-    
-  len -= 3;  /* allow for worst case, '^A\0' */
-
-  while (*src && (len > 0))
-  {
-    if (*src & 0x80)             /* if high bit is set */
-    {
-      *d++ = '.';
-      --len;
-    }
-    else if (!IsPrint(*src))       /* if NOT printable */
-    {
-      *d++ = '^';
-      --len;
-      *d++ = 0x40 + *src;   /* turn it into a printable */
-    }
-    else
-      *d++ = *src;
-    ++src, --len;
-  }
-  *d = '\0';
-  return dest;
-}
-
-/*
  * strip_tabs(dst, src, length)
  *
  *   Copies src to dst, while converting all \t (tabs) into spaces.
@@ -142,7 +102,7 @@
 int
 has_control_characters(const char *msg)
 {
-  char *c;
+  const char *c;
 
   if (msg == NULL)
     return 0;
@@ -189,7 +149,7 @@
 int
 has_colors(const char *msg)
 {
-  char *c;
+  const char *c;
   if (msg == NULL)
     return 0;
 
