if (req.key_len < 0 || req.key_len > 1024)
if (__builtin_expect (req.key_len, 1) < 0 || __builtin_expect (req.key_len, 1) > 1024)
nscd_run (void *p){  long int my_number = (long int) p;  struct pollfd conn;  int run_prune = my_number < lastdb && dbs[my_number].enabled;  time_t now = time (NULL);  time_t next_prune = now + CACHE_PRUNE_INTERVAL;  int timeout = run_prune ? 1000 * (next_prune - now) : -1;  conn.fd = sock;  conn.events = POLLRDNORM;  while (1)    {      int nr = poll (&conn, 1, timeout);      if (nr == 0)	{	  /* The `poll' call timed out.  It's time to clean up the cache.  */	  assert (my_number < lastdb);	  now = time (NULL);	  prune_cache (&dbs[my_number], now);	  next_prune = now + CACHE_PRUNE_INTERVAL;	  timeout = 1000 * (next_prune - now);	  continue;	}      /* We have a new incoming connection.  */      if (conn.revents & (POLLRDNORM|POLLERR|POLLHUP|POLLNVAL))	{	  /* Accept the connection.  */	  int fd = accept (conn.fd, NULL, NULL);	  request_header req;	  char buf[256];	  uid_t uid = 0;	  if (fd < 0)	    {	      dbg_log (_("while accepting connection: %s"),		       strerror_r (errno, buf, sizeof (buf)));	      continue;	    }	  /* Now read the request.  */	  if (TEMP_FAILURE_RETRY (read (fd, &req, sizeof (req)))	      != sizeof (req))	    {	      if (debug_level > 0)		dbg_log (_("short read while reading request: %s"),			 strerror_r (errno, buf, sizeof (buf)));	      close (fd);	      continue;	    }	  /* Some systems have no SO_PEERCRED implementation.  They don't	     care about security so we don't as well.  */#ifdef SO_PEERCRED	  if (secure_in_use)	    {	      struct ucred caller;	      socklen_t optlen = sizeof (caller);	      if (getsockopt (fd, SOL_SOCKET, SO_PEERCRED,			      &caller, &optlen) < 0)		{		  dbg_log (_("error getting callers id: %s"),			   strerror_r (errno, buf, sizeof (buf)));		  close (fd);		  continue;		}	      if (req.type < GETPWBYNAME || req.type > LASTDBREQ		  || secure[serv2db[req.type]])		uid = caller.uid;	    }#endif	  /* It should not be possible to crash the nscd with a silly	     request (i.e., a terribly large key).  We limit the size	     to 1kb.  */	  if (req.key_len < 0 || req.key_len > 1024)	    {	      if (debug_level > 0)		dbg_log (_("key length in request too long: %d"), req.key_len);	      close (fd);	      continue;	    }	  else	    {	      /* Get the key.  */	      char keybuf[req.key_len];	      if (TEMP_FAILURE_RETRY (read (fd, keybuf, req.key_len))		  != req.key_len)		{		  if (debug_level > 0)		    dbg_log (_("short read while reading request key: %s"),			     strerror_r (errno, buf, sizeof (buf)));		  close (fd);		  continue;		}	      /* Phew, we got all the data, now process it.  */	      handle_request (fd, &req, keybuf, uid);	      /* We are done.  */	      close (fd);	    }	}      if (run_prune)	{	  now = time (NULL);	  timeout = now < next_prune ? 1000 * (next_prune - now) : 0;	}    }}