Share

OSE

Tracker: Bugs

5 OTC_ServiceBinding incorrectly detects IP vs. hostname - ID: 1833248
Last Update: Tracker Item Submitted ( david_seaman )

In the constructor of OTC_ServiceBinding, the receiver name is passed as a
string containing colon-delimited fields. There is no way for
OTC_ServiceBinding to know whether the host field is a text-encoded hex IP
address or simply the string of the machine's configured hostname. So, it
uses the istream "hex" operator and checks the fail bit.

If the fail bit is set, then the assumption is that this was a hostname
string, and not a hex value. Likewise, if the fail bit is not set, it is
assumed to be parseable hex. However, because the colon character is parsed
out by calling .ignore(1) on the stream, various likely hostnames can be
misinterpreted.

For instance, the hostname "bm32" is interpreted as the hex IP "b" because
istream will parse as much as it can without setting the fail bit. Then the
"m" is ignored, and "32" is interpreted to be the PID. This has the
eventual effect that all generated events will be wrapped in an envelope
that incorrectly identifies the source host and PID of the event.

This will occur whenever the hostname can be interpreted as two
text-encoded hex values separated by a non-hex character, and WinSock was
not initialized before the first call to OTC_Program::uniqueId().


David Seaman ( david_seaman ) - 2007-11-16 16:32

5

Open

None

Graham Dumpleton

ose-7.0

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.