Win Tims Money! a.k.a. find my sockets bug!

Stephan Rudlof sr at evolgo.de
Sat Apr 22 01:42:40 UTC 2000


Duane Maxwell wrote:
> 
> I'm pretty sure it went like this:
> 
> The IP address was the four bytes:
> 
> D0 DA 03 01 (208.218.3.1)
> 
> But as signed 32-bit values, they are:
> 
> FFFFFFD0 FFFFFFDA 00000003 00000001

OK. I think you should say 'But *interpreted* as (signed char) values,
which are promoted to (signed ints) *then*, they are:....'. Promotion to
(signed int) is not the point alone.

Btw: The bits could be and'ed with appropriate masks after shifting, but
an (unsigned char) definition/cast is simpler.

> After shifting each byte by the appropriate bits, we then added:
> 
> D0000000
> FFDA0000
> 00000300
> 00000001
> 
> which gives us:
> 
> CFDA0301
> 
> which is what John discovered

This seems to be reaonable.

It's really interesting that the code sometimes returns expected (?)
addresses...


Greetings,

Stephan





More information about the Squeak-dev mailing list