[BusyBox 0000980]: patch to avoid "broadcast +" syntax

Roberto A. Foglietta roberto.foglietta at gmail.com
Sat Nov 25 19:19:33 UTC 2006


Denis Vlasenko ha scritto:


> So far I was not able to extract this information from you.
> I am trying to reproduce this supposedly buggy behavior but it works for me.
> Should I mention that it took some effort to just extract testcase
> from you?
> 
> +       while (!stop) {
> +               if((p = *++argv)) {
> +                       ;
> +               } else
> +               if(is_BROADCAST_able()) {
> +                       p = "broadcast";
> +                       stop = 1;
> +               } else
> +                       break;
> 
> Do you understand that busybox is not Obfuscated C contest?
> 
> +       while (!stop) {
> +               p = *++argv;
> +               if (!p) {
> +                       if (!is_BROADCAST_able())
> +                             break;
> +                       p = "broadcast";
> +                       stop = 1;
> +               }
> 

  My patch was not carrying obfuscated code but working one!
:-)

  Applaying just only the printfes you suggested I got this on my 
mandriva 10.2 desktop running on my notebook (a Packard Bell Easynote 
A5360):

[root at nbraf _install]# bin/busybox ifconfig eth0 172.16.128.23
[root at nbraf _install]# bin/busybox ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:C0:9F:72:A8:91
           inet addr:172.16.128.23  Bcast:172.16.255.255  Mask:255.255.0.0


[root at nbraf _install]# bin/busybox ifconfig eth0 172.16.128.23 netmask 
255.255.255.0
p = broadcast
setting BROADCAST <------------------------------------ HERE!!!
[root at nbraf _install]# bin/busybox ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:C0:9F:72:A8:91
           inet addr:172.16.128.23  Bcast:172.16.128.255  Mask:255.255.255.0


  Try yourself in attachment my original obfuscated patch, the printf 
patch and the config. Are you sure we are playing in the same team?
  We are playing in the same team VDA, I am pretty sure about this!

  Cheers,
-- 
Roberto A. Foglietta
http://roberto.foglietta.name
http://linux.genova.it
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-1.1.3-ifconfig.patch.bz2
Type: application/x-bzip2
Size: 1529 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061125/19812e31/attachment-0006.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-1.1.3-ifconfig_printf.patch.bz2
Type: application/x-bzip2
Size: 585 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061125/19812e31/attachment-0007.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox.config.bz2
Type: application/x-bzip2
Size: 3102 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061125/19812e31/attachment-0008.bin 


More information about the busybox mailing list