numerous bugs present in 7.2.0

Michael Wobst michael.wobst at gmail.com
Fri Feb 3 11:09:03 EST 2006


Fixed, thanks!

-Michael

Fool wrote:
> I've found a small bug in the max channel check when someone joines more
> then 1 channel in 1 command. ( ex. JOIN #channel1,#channel2 ).
> The current channels aren't updated, so when the limit is 2 channels per
> user, a user can join 4 channels by using: JOIN #chan1,#chan2,#chan3,#chan4
> 
> To fix this, change line 512 and 513 of ircd-hybrid-7.2.0/modules/core/m_join.c
> to:
> 
> line 512:
> if (((dlink_list_length(&source_p->channel) + ntargets) >=
> ConfigChannel.max_chans_per_user) &&
> 
> line 513:
> (!IsOper(source_p) || ((dlink_list_length(&source_p->channel) + ntargets) >=
> 
> Greetings,
> 
> Patrick aka Fool.
> 
> 
> On 1/30/06, ThaPrince <thaprince at gmail.com> wrote:
>> Hello,
>>
>> I have found numerous bugs in ircd-hybrid 7.2.0 as can be seen below:
>>
>> - sockhost is not properly relayed
>> - match was called wrong causing xlines to fail.
>> - Soft caller ID does not function correctly.
>> - channel list formatting is broken
>>
>> Patch to fix the first 3 issues is below:
>>
>> The 4th issue is something introduced with the new nuh code. you can
>> replicate it like so:
>>
>> /mode #Channel +bbb nick1 nick2 nick3
>>
>> The same is true for any of the lists that take parameters in such a
>> fashion.
>>
>> and look at the output.
>>
>> Regards,
>>
>> Jon
>>
>> Index: src/s_user.c
>> ===================================================================
>> --- src/s_user.c        (revision 380)
>> +++ src/s_user.c        (working copy)
>> @@ -619,8 +619,7 @@
>>                   source_p->name, source_p->hopcount+1,
>>                  (unsigned long)source_p->tsinfo,
>>                   ubuf, source_p->username, source_p->host,
>> -                ((MyClient(source_p) && !IsIPSpoof(source_p)) ?
>> -                source_p->sockhost : "0"),
>> +                IsIPSpoof(source_p) ? "0" : source_p->sockhost,
>>                   source_p->id, source_p->info);
>>      }
>>      else
>> @@ -648,7 +647,7 @@
>>                     source_p->name, source_p->hopcount+1,
>>                    (unsigned long)source_p->tsinfo,
>>                     ubuf, source_p->username, source_p->host,
>> -
>> ((MyClient(source_p)&&!IsIPSpoof(source_p))?source_p->sockhost:"0"),
>> +                  IsIPSpoof(source_p) ? "0" : source_p->sockhost,
>>                     source_p->id, source_p->info);
>>        else
>>          sendto_one(server, "NICK %s %d %lu %s %s %s %s :%s",
>> Index: src/client.c
>> ===================================================================
>> --- src/client.c        (revision 380)
>> +++ src/client.c        (working copy)
>> @@ -1231,11 +1231,13 @@
>>    }
>>
>>    if (IsSoftCallerId(target))
>> -  {
>>      DLINK_FOREACH(ptr, target->channel.head)
>> -      if (IsMember(source, ptr->data))
>> +    {
>> +      struct Channel *chptr = ((struct Membership *) ptr->data)->chptr;
>> +
>> +      if (IsMember(source, chptr))
>>          return (1);
>> -  }
>> +    }
>>
>>    return (0);
>>  }
>> Index: src/s_serv.c
>> ===================================================================
>> --- src/s_serv.c        (revision 380)
>> +++ src/s_serv.c        (working copy)
>> @@ -892,8 +892,8 @@
>>                target_p->name, target_p->hopcount + 1,
>>                (unsigned long) target_p->tsinfo,
>>                ubuf, target_p->username, target_p->host,
>> -
>> ((MyClient(target_p)&&!IsIPSpoof(target_p))?target_p->sockhost:"0"),
>> -          target_p->id, target_p->info);
>> +              IsIPSpoof(target_p) ? "0" : target_p->sockhost,
>> +              target_p->id, target_p->info);
>>    else
>>      sendto_one(client_p, "NICK %s %d %lu %s %s %s %s :%s",
>>                target_p->name, target_p->hopcount + 1,
>> Index: modules/m_xline.c
>> ===================================================================
>> --- modules/m_xline.c   (revision 380)
>> +++ modules/m_xline.c   (working copy)
>> @@ -235,7 +235,7 @@
>>                       "XLINE %s %s %s :%s",
>>                       parv[1], parv[2], parv[3], parv[4]);
>>
>> -  if (match(parv[1], me.name))
>> +  if (!match(parv[1], me.name))
>>      return;
>>
>>    if (find_matching_name_conf(ULINE_TYPE, source_p->servptr->name,
>>
> 




More information about the hybrid mailing list