Eggdev: Re: [eggheads-patches] PATCH1.6: dccsend.patch

Will Buckner wcc at techmonkeys.org
Sun May 21 15:46:37 CST 2006


   if (text[j=0]=='\"') {
     text[j]=' ';
     while (text[++j]!='\"') {
       if (text[j]==' ')
         text[j]='_';
     }
     text[j]=' ';
   }

Problem. If a malformed DCC request is sent (containing only one doublequote), 
this would try to access data past the end of the string. I guess

-while (text[++j]!='\"') {
+
+while (text[++j]!='\0' && text[j]!='\"') {

would fix it?

-Will

David Chelmins wrote:
> This patch was created for the latest version of eggdrop 1.6 as of 4/18/06.
> 
> Description:
> 
>     Eggdrop has difficulty receiving any file by DCC Send whose name has 
> spaces. When such a file is sent, an error message is logged as in the 
> following:
> 
> [15:15] -skypoint (~llamo at WonderNet-User-E8FC34FB.onu.edu)- DCC Send Alanis 
> Morissette - Uninvited.mp3 (140.228.125.102)
> [15:15] Refused dcc send "Alanis (skypoint): invalid port
> [15:15] CTCP DCC: SEND "Alanis Morissette - Uninvited.mp3" 2363784550 3003 
> 6696661 from skypoint (~llamo at WonderNet-User-E8FC34FB.onu.edu)
> 
>     With the patch applied, eggdrop will replace spaces in the file name 
> with underscores and eliminate the two quotation marks surrounding the name.
> 
> [15:05] -skypoint (~llamo at WonderNet-User-E8FC34FB.onu.edu)- DCC Send Alanis 
> Morissette - Uninvited.mp3 (140.228.125.102)
> [15:05] CTCP DCC: SEND "Alanis Morissette - Uninvited.mp3" 2363784550 3000 
> 6696661 from skypoint (~llamo at WonderNet-User-E8FC34FB.onu.edu)
> [15:05] DCC connection: SEND Alanis_Morissette_-_Uninvited.mp3 
> (skypoint!~llamo at WonderNet-User-E8FC34FB.onu.edu)
> [15:05] Completed dcc send Alanis_Morissette_-_Uninvited.mp3 from 
> skypoint!~llamo at WonderNet-User-E8FC34FB.onu.edu
> 
>     The patch is accomplished by modifying the DCC Send string that is 
> stored in memory, causing Eggdrop to believe it is being sent a file whose 
> name does not contain spaces. See the attached patch for more details.
> 
> Sincerely,
> David Chelmins 




More information about the Eggdev mailing list