Revision: 1929
          
http://undernet-ircu.svn.sourceforge.net/undernet-ircu/?rev=1929&view=rev
Author:   entrope
Date:     2010-01-03 21:20:56 +0000 (Sun, 03 Jan 2010)

Log Message:
-----------
Fix SF bug #2895252 by changing the trailing space to a nul character.

Modified Paths:
--------------
    ircu2/branches/u2_10_12_branch/ChangeLog
    ircu2/branches/u2_10_12_branch/ircd/m_names.c

Modified: ircu2/branches/u2_10_12_branch/ChangeLog
===================================================================
--- ircu2/branches/u2_10_12_branch/ChangeLog    2010-01-03 21:04:54 UTC (rev 
1928)
+++ ircu2/branches/u2_10_12_branch/ChangeLog    2010-01-03 21:20:56 UTC (rev 
1929)
@@ -1,5 +1,10 @@
 2010-01-03  Michael Poole <[email protected]>
 
+       * ircd/m_names.c (m_names): Terminate the buffer used for listing
+       clients who are not in any channel.
+
+2010-01-03  Michael Poole <[email protected]>
+
        * ircd/channel.c (find_delayed_joins): Move earlier in the file.
        (modebuf_flush_int): Move the checks for changing between +D and
        +d to here...

Modified: ircu2/branches/u2_10_12_branch/ircd/m_names.c
===================================================================
--- ircu2/branches/u2_10_12_branch/ircd/m_names.c       2010-01-03 21:04:54 UTC 
(rev 1928)
+++ ircu2/branches/u2_10_12_branch/ircd/m_names.c       2010-01-03 21:20:56 UTC 
(rev 1929)
@@ -285,6 +285,7 @@
 
         if (mlen + idx + NICKLEN + 3 > BUFSIZE)     /* space, \r\n\0 */
         {
+          buf[idx-1] = '\0';
           send_reply(sptr, RPL_NAMREPLY, buf);
           strcpy(buf, "* * :");
           idx = 5;
@@ -292,7 +293,10 @@
         }
       }
       if (flag)
+      {
+        buf[idx-1] = '\0';
         send_reply(sptr, RPL_NAMREPLY, buf);
+      }
       send_reply(sptr, RPL_ENDOFNAMES, "*");
     }
     else if ((chptr = FindChannel(para)) != NULL)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to