On Tue, Apr 17, 2007 at 11:00:09AM +0200, Karsten Otto wrote:
> Hi all,
> 
> Reading about Trer'angreal crashing or hanging, I just recently  
> discovered a small bug in the message handling of the 0.23.0 release.  
> Of course this is regarding the VOP protocol, which probably nobody  
> except me uses anymore, so I am not sure anybody else is affected :-)
> 
> During normal operation wxterangreal sometimes came to a screeching  
> halt with the obscure error message "Remote site error: Protocol  
> violation: negative number attribute"
> 
> I tracked this down to libs/vos/vos/ 
> messageblock.cc:XmlParser::parseNumberAttr,
> which basically does this:
> 
> int res = (int)strtoul(start+pos+1, &end, 10);
> if (res < 0) throw ProtocolError(...)
>
> [snip]
>
> Is the range check actually necessary in this method? I don't have  
> the time to track this down...

You're right.  I'm an idiot.  The variable "res" should be an unsigned 
int, and the range check is unnecessary.  I have no idea why that code 
is there, and I'll take it out.
 
> Despite of this obvious bug, I am pleased to see that VOP still sort  
> of works despite the long neglect :-)

I'm glad it's been useful to you.  It's also proven to us the value of 
supporting multiple protocols that focus on different aspects like 
performance or ease of interoperability -- hopefully s5 will finally 
support multiple protocols within a single session :-)

-- 
[   Peter Amstutz  ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]

Attachment: signature.asc
Description: Digital signature

_______________________________________________
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

Reply via email to