off by 1 bug in poa.c



In ORBit 2.6.0 poa.c:1340 it can be read:


CORBA_char *
PortableServer_ObjectId_to_string (PortableServer_ObjectId *id,
                                   CORBA_Environment       *ev)
{

...

    poa_sys_exception_val_if_fail (
       memchr(id->_buffer,'\0',id->_length), 
       ex_CORBA_BAD_PARAM, 
       NULL);
...


I think it should read:

    poa_sys_exception_val_if_fail (
          memchr(id->_buffer,'\0',id->_length+1),
          ex_CORBA_BAD_PARAM,
          NULL);

Otherwise the object_ids generated by ..._string_to_ObjectId would
be incorrect.

Paco




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]