This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Undernet IRC Server Source Code.".

The branch, u2_10_12_branch has been updated
       via  9b7611755415a25e338489d08f5cecdc1cca4bf0 (commit)
       via  521973928e2dedd2ca39dbd06d65b0a3e81f70e4 (commit)
       via  8a9a9a80a4b545092f7bb6c3ecc8128ee064afd1 (commit)
       via  7e978f974b21308dc36d6d77c546262da9b5543c (commit)
       via  053e529b3e6af7ead7edba9c445e6c8ae92b1f7e (commit)
       via  3ce5623b9ebda6614229e51927260333245bd034 (commit)
       via  8375a809fe2694c00f9b2750a2741a6eb90ac16c (commit)
       via  20357c6303aec81f3e67392c4729daea1c79db23 (commit)
       via  7bdd74beaa3d9e225cea1eaaebe5968cd912b0a3 (commit)
       via  35cf0933d5462966c1cbcfe44a9825e6c08b4b90 (commit)
       via  30d035b8f0c8bd0220d914f2a02fb4e3533c8240 (commit)
       via  3940b985dd16606ffa411b7fc66fd787411ece97 (commit)
       via  87211aae9fd036ec61f329d8d4f7cfb1ca375056 (commit)
       via  7495ac7f485764c82cf48e4f9ce616cc1a709adb (commit)
      from  320cec99280572975d8b1abbf76495bc332cc1c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9b7611755415a25e338489d08f5cecdc1cca4bf0
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:58:34 2020 -0400

    ipmask_parse: Avoid shadowing local variable "colon"

diff --git a/ircd/ircd_string.c b/ircd/ircd_string.c
index ed0349ea..cbcedc5b 100644
--- a/ircd/ircd_string.c
+++ b/ircd/ircd_string.c
@@ -526,16 +526,16 @@ ircd_aton_ip4(const char *input, unsigned int *output, 
unsigned char *pbits)
 int
 ipmask_parse(const char *input, struct irc_in_addr *ip, unsigned char *pbits)
 {
-  char *colon;
+  char *colon_char;
   char *dot;
 
   assert(ip);
   assert(input);
   memset(ip, 0, sizeof(*ip));
-  colon = strchr(input, ':');
+  colon_char = strchr(input, ':');
   dot = strchr(input, '.');
 
-  if (colon && (!dot || (dot > colon))) {
+  if (colon_char && (!dot || (dot > colon_char))) {
     unsigned int part = 0, pos = 0, ii = 0, colon = 8;
     const char *part_start = NULL;
 
commit 521973928e2dedd2ca39dbd06d65b0a3e81f70e4
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:56:01 2020 -0400

    modebuf_extract: Do not trust mb_add for modes with arguments

diff --git a/ircd/channel.c b/ircd/channel.c
index ef670f4b..ac18799f 100644
--- a/ircd/channel.c
+++ b/ircd/channel.c
@@ -2121,7 +2121,7 @@ modebuf_extract(struct ModeBuf *mbuf, char *buf)
   buf[0] = '\0';
   limitbuf[0] = '\0';
 
-  add = mbuf->mb_add;
+  add = mbuf->mb_add & ~(MODE_KEY | MODE_LIMIT | MODE_APASS | MODE_UPASS);
 
   for (i = 0; i < mbuf->mb_count; i++) { /* find keys and limits */
     if (MB_TYPE(mbuf, i) & MODE_ADD) {
commit 8a9a9a80a4b545092f7bb6c3ecc8128ee064afd1
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:55:37 2020 -0400

    mode_parse_client: Sanity-check that i < MAXPARA
    
    Before we write to state->cli_change[i], we should confirm that we can.

diff --git a/ircd/channel.c b/ircd/channel.c
index 7226949a..ef670f4b 100644
--- a/ircd/channel.c
+++ b/ircd/channel.c
@@ -3039,6 +3039,10 @@ mode_parse_client(struct ParseState *state, int *flag_p)
                                       state->cli_change[i].flag & flag_p[0]))
       break; /* found a slot */
 
+  /* The check on max_args should prevent this for local clients. */
+  if (i >= MAXPARA)
+    return;
+
   /* If we are going to bounce this deop, mark the correct oplevel. */
   if (state->flags & MODE_PARSE_BOUNCE
       && state->dir == MODE_DEL
commit 7e978f974b21308dc36d6d77c546262da9b5543c
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:55:00 2020 -0400

    joinbuf_join: Bail early for PART if no membership

diff --git a/ircd/channel.c b/ircd/channel.c
index 326b4e5d..7226949a 100644
--- a/ircd/channel.c
+++ b/ircd/channel.c
@@ -3511,7 +3511,7 @@ joinbuf_join(struct JoinBuf *jbuf, struct Channel *chan, 
unsigned int flags)
   if (jbuf->jb_type == JOINBUF_TYPE_PART ||
       jbuf->jb_type == JOINBUF_TYPE_PARTALL) {
     struct Membership *member = find_member_link(chan, jbuf->jb_source);
-    if (IsUserParting(member))
+    if (!member || IsUserParting(member))
       return;
     SetUserParting(member);
 
commit 053e529b3e6af7ead7edba9c445e6c8ae92b1f7e
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:54:37 2020 -0400

    channel.c: Initialize limitbuf to empty

diff --git a/ircd/channel.c b/ircd/channel.c
index 2f8e96a7..326b4e5d 100644
--- a/ircd/channel.c
+++ b/ircd/channel.c
@@ -1633,6 +1633,7 @@ modebuf_flush_int(struct ModeBuf *mbuf, int all)
   }
 
   /* Now go through the modes with arguments... */
+  limitbuf[0] = '\0';
   for (i = 0; i < mbuf->mb_count; i++) {
     if (MB_TYPE(mbuf, i) & MODE_ADD) { /* adding or removing? */
       bufptr = addbuf;
@@ -2118,6 +2119,7 @@ modebuf_extract(struct ModeBuf *mbuf, char *buf)
   assert(0 != buf);
 
   buf[0] = '\0';
+  limitbuf[0] = '\0';
 
   add = mbuf->mb_add;
 
commit 3ce5623b9ebda6614229e51927260333245bd034
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:53:56 2020 -0400

    crule_parseprimary: Remove redundant return.

diff --git a/ircd/crule.c b/ircd/crule.c
index 8c388279..02ed3cac 100644
--- a/ircd/crule.c
+++ b/ircd/crule.c
@@ -637,7 +637,6 @@ static int crule_parseprimary(CRuleNodePtr* primrootp, int 
*next_tokp, const cha
           errcode = CR_EXPCTPRIM;
         break;
     }
-    return (errcode);
   }
   return (errcode);
 }
commit 8375a809fe2694c00f9b2750a2741a6eb90ac16c
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:53:42 2020 -0400

    gline_modify: Only allow changes with a new reason

diff --git a/ircd/gline.c b/ircd/gline.c
index ae8f5a27..d4cfe6e1 100644
--- a/ircd/gline.c
+++ b/ircd/gline.c
@@ -851,7 +851,7 @@ gline_modify(struct Client *cptr, struct Client *sptr, 
struct Gline *gline,
   }
 
   /* Now, handle reason changes... */
-  if (flags & GLINE_REASON) {
+  if ((flags & GLINE_REASON) && reason) {
     non_auto = non_auto || ircd_strncmp(gline->gl_reason, "AUTO", 4);
     MyFree(gline->gl_reason); /* release old reason */
     DupString(gline->gl_reason, reason); /* store new reason */
commit 20357c6303aec81f3e67392c4729daea1c79db23
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:53:11 2020 -0400

    feature_reset: Minor code cleanups
    
    Return early when count < 1.
    
    Don't check "from" near the end; we already assumed it was valid.

diff --git a/ircd/ircd_features.c b/ircd/ircd_features.c
index 64a06439..0b8aec1d 100644
--- a/ircd/ircd_features.c
+++ b/ircd/ircd_features.c
@@ -632,8 +632,9 @@ feature_reset(struct Client* from, const char* const* 
fields, int count)
     return send_reply(from, ERR_NOPRIVILEGES);
 
   if (count < 1) /* check arguments */
-    need_more_params(from, "RESET");
-  else if ((feat = feature_desc(from, fields[0]))) { /* get descriptor */
+    return need_more_params(from, "RESET");
+
+  if ((feat = feature_desc(from, fields[0]))) { /* get descriptor */
     if (feat->flags & FEAT_READ)
       return send_reply(from, ERR_NOFEATURE, fields[0]);
 
@@ -673,8 +674,7 @@ feature_reset(struct Client* from, const char* const* 
fields, int count)
     if (change && feat->notify) /* call change notify function */
       (*feat->notify)();
 
-    if (from)
-      return feature_get(from, fields, count);
+    return feature_get(from, fields, count);
   }
 
   return 0;
commit 7bdd74beaa3d9e225cea1eaaebe5968cd912b0a3
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:52:01 2020 -0400

    labellen: Mask the length that can be returned
    
    This should (fingers crossed) make it clear that the return value is not
    tainted.

diff --git a/ircd/ircd_reslib.c b/ircd/ircd_reslib.c
index 1a647f8b..959e38cf 100644
--- a/ircd/ircd_reslib.c
+++ b/ircd/ircd_reslib.c
@@ -649,7 +649,7 @@ labellen(const unsigned char *lp)
     return(-1); /* unknown ELT */
   }
 
-  return(l);
+  return(l & ~NS_CMPRSFLGS);
 }
 
 
commit 35cf0933d5462966c1cbcfe44a9825e6c08b4b90
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:49:09 2020 -0400

    ms_nick: Move sanity check of sptr

diff --git a/ircd/m_nick.c b/ircd/m_nick.c
index 84907e30..7b7dd4c5 100644
--- a/ircd/m_nick.c
+++ b/ircd/m_nick.c
@@ -299,6 +299,9 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int 
parc, char* parv[])
     return need_more_params(sptr, "NICK");
   }
 
+  if (sptr == NULL)
+    return 0;
+
   ircd_strncpy(nick, parv[1], NICKLEN);
   nick[NICKLEN] = '\0';
 
@@ -491,7 +494,5 @@ int ms_nick(struct Client* cptr, struct Client* sptr, int 
parc, char* parv[])
                   feature_str(FEAT_HIS_SERVERNAME), type);
   if (lastnick == cli_lastnick(acptr))
     return 0;
-  if (sptr == NULL)
-    return 0;
   return set_nick_name(cptr, sptr, nick, parc, parv);
 }
commit 30d035b8f0c8bd0220d914f2a02fb4e3533c8240
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:48:16 2020 -0400

    parse_server: Bail if a server sends us an invalid numeric
    
    If the server sent 000, this would try to dereference mptr == NULL.

diff --git a/ircd/parse.c b/ircd/parse.c
index c31f9fbb..bb38e12d 100644
--- a/ircd/parse.c
+++ b/ircd/parse.c
@@ -1142,6 +1142,12 @@ int parse_server(struct Client *cptr, char *buffer, char 
*bufend)
   if (len == 3 && IsDigit(*ch))
   {
     numeric = (*ch - '0') * 100 + (*(ch + 1) - '0') * 10 + (*(ch + 2) - '0');
+    if ((numeric < 1) || (numeric > 999))
+    {
+      Debug((DEBUG_NOTICE, "Bad numeric: Message (%s) coming from (%s)",
+          buffer, cli_name(cptr)));
+      return -1;
+    }
     paramcount = 2; /* destination, and the rest of it */
     ServerStats->is_num++;
     mptr = NULL;                /* Init. to avoid stupid compiler warning :/ */
commit 3940b985dd16606ffa411b7fc66fd787411ece97
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:47:25 2020 -0400

    umkpasswd: Do not try to print function pointer
    
    A function pointer is not an unsigned integer that is compatible with the
    %X format field, and standard C does not allow converting a function
    pointer to a type like (void *) that would be compatible with %p.

diff --git a/ircd/umkpasswd.c b/ircd/umkpasswd.c
index 86c04646..3d206874 100644
--- a/ircd/umkpasswd.c
+++ b/ircd/umkpasswd.c
@@ -176,8 +176,8 @@ crypt_mechs_t* crypt_mech;
  }
 
  /* we're done */
- Debug((DEBUG_INFO, "ircd_crypt_register_mech: registered mechanism: %s, 
crypt_function is at 0x%X.", crypt_mech->mech->shortname, 
&crypt_mech->mech->crypt_function));
- Debug((DEBUG_INFO, "ircd_crypt_register_mech: %s: %s", 
crypt_mech->mech->shortname, crypt_mech->mech->description));
+ Debug((DEBUG_INFO, "ircd_crypt_register_mech: registered mechanism: %s.", 
crypt_mech->mech->shortname));
+ Debug((DEBUG_INFO, "ircd_crypt_register_mech: description: %s", 
crypt_mech->mech->description));
 
 return 0;
 }
commit 87211aae9fd036ec61f329d8d4f7cfb1ca375056
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:46:02 2020 -0400

    client_set_privs: Fix misplaced close parenthesis

diff --git a/ircd/client.c b/ircd/client.c
index f69198f4..c2ff596b 100644
--- a/ircd/client.c
+++ b/ircd/client.c
@@ -183,8 +183,8 @@ client_set_privs(struct Client *client, struct ConfItem 
*oper, int forceOper)
   else
   {
     class = find_class("RemoteOpers");
-    if (class && (!FlagHas(&class->privs_dirty, PRIV_PROPAGATE
-              || !FlagHas(&class->privs, PRIV_PROPAGATE))))
+    if (class && (!FlagHas(&class->privs_dirty, PRIV_PROPAGATE)
+              || !FlagHas(&class->privs, PRIV_PROPAGATE)))
       class = NULL;
   }
 
commit 7495ac7f485764c82cf48e4f9ce616cc1a709adb
Author: Michael Poole <[email protected]>
Date:   Sun Jun 28 11:45:31 2020 -0400

    ircd_chattr: Define the array size for our character tables

diff --git a/include/ircd_chattr.h b/include/ircd_chattr.h
index adbbabda..fd932bc1 100644
--- a/include/ircd_chattr.h
+++ b/include/ircd_chattr.h
@@ -66,13 +66,13 @@
 /** Array mapping characters to RFC 1459 lower-case versions.
  * Yes, the variable name lies about the encoding.
  */
-extern const char ToLowerTab_8859_1[];
+extern const char ToLowerTab_8859_1[256];
 /** Array mapping characters to RFC 1459 upper-case versions.
  * Yes, the variable name lies about the encoding.
  */
-extern const char ToUpperTab_8859_1[];
+extern const char ToUpperTab_8859_1[256];
 /** Array mapping characters to attribute bitmasks. */
-extern const unsigned int  IRCD_CharAttrTab[];
+extern const unsigned int  IRCD_CharAttrTab[256];
 
 /*
  * Translation macros for channel name case translation
diff --git a/ircd/table_gen.c b/ircd/table_gen.c
index 9aff5e1d..00e353b2 100644
--- a/ircd/table_gen.c
+++ b/ircd/table_gen.c
@@ -154,7 +154,7 @@ int main(void)
   printf("#include <limits.h>\n");
 
   /* NTL_tolower_tab */
-  printf("const char ToLowerTab_8859_1[] = {\n");
+  printf("const char ToLowerTab_8859_1[256] = {\n");
   printf("#if (CHAR_MIN<0)\n");
   i = (int)((char)SCHAR_MIN);
   dumphb(NTL_tolower_tab, i);
@@ -170,7 +170,7 @@ int main(void)
   printf("  };\n\n");
 
   /* NTL_toupper_tab */
-  printf("const char ToUpperTab_8859_1[] = {\n");
+  printf("const char ToUpperTab_8859_1[256] = {\n");
   printf("#if (CHAR_MIN<0)\n");
   i = (int)((char)SCHAR_MIN);
   dumphb(NTL_toupper_tab, i);
@@ -186,7 +186,7 @@ int main(void)
   printf("  };\n\n");
 
   /* NTL_char_attrib */
-  printf("const unsigned int IRCD_CharAttrTab[] = {\n");
+  printf("const unsigned int IRCD_CharAttrTab[256] = {\n");
   printf("#if (CHAR_MIN<0)\n");
   i = (int)((char)SCHAR_MIN);
   dumphw(NTL_char_attrib, i);
-----------------------------------------------------------------------

Summary of changes:
 include/ircd_chattr.h |  6 +++---
 ircd/channel.c        | 10 ++++++++--
 ircd/client.c         |  4 ++--
 ircd/crule.c          |  1 -
 ircd/gline.c          |  2 +-
 ircd/ircd_features.c  |  8 ++++----
 ircd/ircd_reslib.c    |  2 +-
 ircd/ircd_string.c    |  6 +++---
 ircd/m_nick.c         |  5 +++--
 ircd/parse.c          |  6 ++++++
 ircd/table_gen.c      |  6 +++---
 ircd/umkpasswd.c      |  4 ++--
 12 files changed, 36 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
Undernet IRC Server Source Code.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to