[omniORB] Bug in the cdrStream::unmarshalRawString

Serguei Kolos Serguei.Kolos at cern.ch
Mon Mar 13 15:32:26 GMT 2006


Hello

I believe there is a bug in the cdrStream::unmarshalRawString function
(src/lib/omniORB/orbcore/corbaString.cc file). If the length of the 
unmarshalled
string is zero (variable len, which is equal to string length + 1, is 
1), the line 183 of
that file reads unallocated byte and throws an exception if this byte is 
not 0.

183: if (s[len-1] != '\0')
184:    OMNIORB_THROW(MARSHAL,MARSHAL_StringNotEndWithNull,
185:                 (CORBA::CompletionStatus)completion());

Cheers,
Sergei

PS: the bug has been found with valgrind



More information about the omniORB-list mailing list