tags 300638 + patch fixed-upstream
thanks

This bug is caused by the way va_list is used in src/send.c which
seems to cause problems on (at least) amd64 and ppc.

Upstream has fixed this last December (see r286 and r288 in svn).

Backporting this changes to the version in unstable fixes the problem
for me (amd64).
diff -Nur ircd-hybrid-7.0.3/src/send.c ircd-hybrid-7.0.3.patched/src/send.c
--- ircd-hybrid-7.0.3/src/send.c        2004-02-10 05:28:40.000000000 +0100
+++ ircd-hybrid-7.0.3.patched/src/send.c        2006-04-20 02:50:14.000000000 
+0200
@@ -501,7 +501,7 @@
                       struct Channel *chptr, char *command,
                       const char *pattern, ...)
 {
-  va_list    args;
+  va_list    alocal, aremote, auid;
   buf_head_t local_linebuf;
   buf_head_t remote_linebuf;
   buf_head_t uid_linebuf;
@@ -509,23 +509,27 @@
   linebuf_newbuf(&local_linebuf);
   linebuf_newbuf(&remote_linebuf);
   linebuf_newbuf(&uid_linebuf);
-  va_start(args, pattern);
+  va_start(alocal, pattern);
+  va_start(aremote, pattern);
+  va_start(auid, pattern);
 
   if(IsServer(from))
-    linebuf_putmsg(&local_linebuf, pattern, &args, ":%s %s %s ",
+    linebuf_putmsg(&local_linebuf, pattern, &alocal, ":%s %s %s ",
                    from->name, command, RootChan(chptr)->chname);
   else
-    linebuf_putmsg(&local_linebuf, pattern, &args, ":[EMAIL PROTECTED] %s %s ",
+    linebuf_putmsg(&local_linebuf, pattern, &alocal, ":[EMAIL PROTECTED] %s %s 
",
                    from->name, from->username, from->host,
                    command, RootChan(chptr)->chname);
 
-  linebuf_putmsg(&remote_linebuf, pattern, &args, ":%s %s %s ",
+  linebuf_putmsg(&remote_linebuf, pattern, &aremote, ":%s %s %s ",
                  from->name, command, chptr->chname);
 
-  linebuf_putmsg(&uid_linebuf, pattern, &args, ":%s %s %s ",
+  linebuf_putmsg(&uid_linebuf, pattern, &auid, ":%s %s %s ",
                  ID(from), command, chptr->chname);
 
-  va_end(args);
+  va_end(auid);
+  va_end(aremote);
+  va_end(alocal);
 
   ++current_serial;
 
@@ -1045,7 +1049,7 @@
                     char *mask, int what,
                     const char *pattern, ...)
 {
-  va_list args;
+  va_list alocal, aremote;
   struct Client *client_p;
   dlink_node *ptr;
   dlink_node *ptr_next;
@@ -1054,13 +1058,15 @@
 
   linebuf_newbuf(&local_linebuf);
   linebuf_newbuf(&remote_linebuf);
-  va_start(args, pattern);
+  va_start(alocal, pattern);
+  va_start(aremote, pattern);
 
-  linebuf_putmsg(&remote_linebuf, pattern, &args, ":%s ", from->name);
-  linebuf_putmsg(&local_linebuf, pattern, &args, ":[EMAIL PROTECTED] ", 
from->name,
+  linebuf_putmsg(&remote_linebuf, pattern, &aremote, ":%s ", from->name);
+  linebuf_putmsg(&local_linebuf, pattern, &alocal, ":[EMAIL PROTECTED] ", 
from->name,
                 from->username, from->host);
 
-  va_end(args);
+  va_end(aremote);
+  va_end(alocal);
 
   /* scan the local clients */
   DLINK_FOREACH_SAFE(ptr, ptr_next, lclient_list.head)
@@ -1416,16 +1422,18 @@
   buf_head_t linebuf_uid;
   buf_head_t linebuf_nick;
 
-  va_start(args, pattern);
-
   if(HasID(source_p))
   {
     have_uid = 1;
+    va_start(args, pattern);
     linebuf_newbuf(&linebuf_uid);
     linebuf_putmsg(&linebuf_uid, pattern, &args, ":%s KILL %s :",
                    me.name, ID(source_p));
+    va_end(args);
   }
 
+  va_start(args, pattern);
+
   linebuf_newbuf(&linebuf_nick);
   linebuf_putmsg(&linebuf_nick, pattern, &args, ":%s KILL %s :",
                  me.name, source_p->name);

Attachment: signature.asc
Description: Digital signature

Reply via email to