Package: Netcat
Version: 1.10-32

Fix fd value check in netcat.
--- ./netcat.c	2007-11-27 15:10:08.000000000 +0100
+++ ./netcat.c	2007-11-27 15:11:33.000000000 +0100
@@ -48,7 +48,7 @@
 #ifdef FD_SETSIZE		/* should be in types.h, butcha never know. */
 #undef FD_SETSIZE		/* if we ever need more than 16 active */
 #endif				/* fd's, something is horribly wrong! */
-#define FD_SETSIZE 16		/* <-- this'll give us a long anyways, wtf */
+#define FD_SETSIZE 1024		/* <-- this'll give us a long anyways, wtf */
 #include <sys/types.h>		/* *now* do it.  Sigh, this is broken */
 
 #ifdef HAVE_RANDOM		/* aficionados of ?rand48() should realize */
@@ -1217,7 +1217,7 @@
 /* if you don't have all this FD_* macro hair in sys/types.h, you'll have to
    either find it or do your own bit-bashing: *ding1 |= (1 << fd), etc... */
   if (fd > FD_SETSIZE) {
-    holler ("Preposterous fd value %d", fd);
+    holler ("fd value %d > FD_SETSIZE (%d)", fd, FD_SETSIZE);
     return (1);
   }
   FD_SET (fd, ding1);		/* global: the net is open */

Reply via email to