--- spamc.c.orig	Fri May  3 13:37:04 2002
+++ spamc.c	Mon Apr 29 16:31:25 2002
@@ -94,6 +94,7 @@
 {
   int total;
   int thistime;
+  char *dump;
 
   for (total = 0; total < min; ) {
     thistime = read (fd, buf+total, len-total);
@@ -108,6 +109,17 @@
 
     total += thistime;
   }
+
+  if (((len-total-thistime) <= 0) && (min > 8192)) { /* Flush read buffer if this was a big read */
+     dump = malloc (102400); /* 100k */               /* Kind of a kludge, I know... */
+
+     if (dump) {
+        while (read (fd, dump, 102400));
+
+        free (dump);
+     }
+   }
+
   return total;
 }
 
