! Found by: jemalloc
--- fillfnam.c.orig	Sat Dec  3 13:49:43 2005
+++ fillfnam.c	Wed Jan 25 20:05:14 2006
@@ -4,7 +4,7 @@
 
 char *filterarray;
 
-int filter(const struct dirent *ent) {
+int filter(struct dirent *ent) {
   if (filterarray == NULL)
     return(1);
   if (strncmp(ent->d_name, filterarray, strlen(filterarray)) == 0)
@@ -50,7 +50,11 @@ int tab_pressed(char *cmdlinefull, int *
   strncpy(part2, cmdlinefull + i + 1, cmdoff - i - 1);
   part2[cmdoff - i - 1] = '\0';
 
-  path = (char*)malloc(strlen(part2) + 1);
+  len = strlen(part2);
+  /* We need at least 2+1 characters for ./\0 in else path. */
+  if (len < 2)
+    len = 2;
+  path = (char*)malloc(len + 1);
   filename = part2;
   /* is it pure filename or is there whole path ? */
   tmp = strrchr(part2, '/');
--- hercifc.h.orig	Thu Dec  1 17:37:25 2005
+++ hercifc.h	Wed Jan 25 20:05:14 2006
@@ -88,7 +88,7 @@ typedef struct _CTLREQ
   union
   {
     struct ifreq     ifreq;
-#if !defined(__APPLE__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
     struct rtentry   rtentry;
 #endif
   }
