Commits

jilles  committed cf68e65

[svn] Fix some cases where the size argument to strlcpy()
for usernames and hostnames is 1 too small.

  • Participants
  • Parent commits 5345574

Comments (0)

Files changed (5)

+jilles      2007/03/04 23:42:55 UTC	(20070304-3225)
+  Log:
+  Cut down quit/part/kick reasons to avoid quit reasons
+  overflowing the client exiting server notice (from
+  TOPICLEN to 260). kill reasons become shorter accordingly.
+  kline/dline/gline reasons become 390.
+  away messages stay at TOPICLEN for now.
+  
+
+  Changes:	Modified:
+  +8 -3		trunk/include/ircd_defs.h (File Modified) 
+  +2 -2		trunk/modules/m_dline.c (File Modified) 
+  +4 -4		trunk/modules/m_gline.c (File Modified) 
+  +2 -2		trunk/modules/m_kline.c (File Modified) 
+
+
 jilles      2007/03/02 17:45:47 UTC	(20070302-3223)
   Log:
   Don't leak auth{} spoofed IP addresses in +f notices.

File include/serno.h

-#define SERNO "20070302-3223"
+#define SERNO "20070304-3225"

File modules/m_chghost.c

 
 mapi_clist_av1 chghost_clist[] = { &chghost_msgtab, &realhost_msgtab, NULL };
 
-DECLARE_MODULE_AV1(chghost, NULL, NULL, chghost_clist, NULL, NULL, "$Revision: 1865 $");
+DECLARE_MODULE_AV1(chghost, NULL, NULL, chghost_clist, NULL, NULL, "$Revision: 3227 $");
 
 /* clean_host()
  *
 		return 0;
 
 	del_from_hostname_hash(source_p->orighost, source_p);
-	strlcpy(source_p->orighost, parv[1], HOSTLEN);
+	strlcpy(source_p->orighost, parv[1], sizeof source_p->orighost);
 	if (irccmp(source_p->host, source_p->orighost))
 		SetDynSpoof(source_p);
 	else
  * The authors takes no responsibility for any damage or loss
  * of property which results from the use of this software.
  *
- * $Id: res.c 2023 2006-09-02 23:47:27Z jilles $
+ * $Id: res.c 3227 2007-03-05 01:14:46Z jilles $
  * from Hybrid Id: res.c 459 2006-02-12 22:21:37Z db $
  *
  * July 1999 - Rewrote a bunch of stuff here. Change hostent builder code,
 {
 	char host_name[HOSTLEN + 1];
 
-	strlcpy(host_name, name, HOSTLEN);
+	strlcpy(host_name, name, HOSTLEN + 1);
 	add_local_domain(host_name, HOSTLEN);
 
 	if (request == NULL)
 			  else if (n == 0)
 				  return (0);	/* no more answers left */
 
-			  strlcpy(request->name, hostbuf, HOSTLEN);
+			  strlcpy(request->name, hostbuf, HOSTLEN + 1);
 
 			  return (1);
 			  break;

File src/s_user.c

  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: s_user.c 3219 2007-02-24 19:34:28Z jilles $
+ *  $Id: s_user.c 3227 2007-03-05 01:14:46Z jilles $
  */
 
 #include "stdinc.h"
 				target_p->host, nick);
 	}
 
-	strlcpy(target_p->username, user, USERLEN);
-	strlcpy(target_p->host, host, HOSTLEN);
+	strlcpy(target_p->username, user, sizeof target_p->username);
+	strlcpy(target_p->host, host, sizeof target_p->host);
 
 	if (changed)
 		add_history(target_p, 1);