Improper embedded SOH handling in tag 213 -
Brought to you by:
orenmnero
When receiving a SOH character in the XmlData field, the message is not passed to `fromApp'. There is an "Invalid message: Expected BodyLength=100, Recieved BodyLength=101" error logged. The sending application (also quickfix) has no problem calculating the length of the message it is generating.
If I receive a (nearly) identical message with a PIPE or STX instead of an SOH, the message is correctly handled with 9=101.
I am able to reproduce this problem on linux (compiled) and windows (bin-vs9) with version 1.13.2
"messages" and "event" logs -
Able to reproduce problem on windows version 1.13.3 (bin-vs9).
Also able to reproduce on linux with version 1.13.3.
The same problem happens with embedded SOH characters in RawData as well - I'm guessing this is true with all `Data' fields.
I've begun tracking the problem in more detail and have found that `m_string' in FieldBase is populated with the field UP TO the embedded SOH. This is because of the logic in Message::extractField which says that the field ends at the first SOH encountered. There is additional logic to handle `Data' field types, but i am unable to enter into this logic.
Any help with this would be greatly appreciated.
Thanks,