RE: [Quickfix-developers] Field with embedded null character
Brought to you by:
orenmnero
From: Yihu F. <Yih...@re...> - 2004-10-29 20:46:30
|
Caleb, Thanks for the patch. Oren, when you have an extra null byte, the bodylength value increases by 1. So the checksum should increase by 1 too. -Yihu -----Original Message----- From: Oren Miller [mailto:or...@qu...]=20 Sent: Friday, October 29, 2004 3:59 PM To: Caleb Epstein Cc: Yihu Fang; qui...@li... Subject: Re: [Quickfix-developers] Field with embedded null character I added some unit tests and it seems to work except for one problem. I=20 have a message that I'm passing into the messages constructor, which is=20 just a normal message. The checksum of this message is 218. The test=20 is that I send the same message in except I added a null character at=20 the end of one of the fields. It is able to parse everything fine, but=20 it determines that the checksum of the message with the null should be=20 219 and throws an Invalid message. Now since null has a value of 0 I=20 would expect that the checksum of these two messages should be=20 identical. Anybody see any flaw in this reasoning? --oren On Oct 29, 2004, at 9:37 AM, Caleb Epstein wrote: > Attached is a comprehensive patch to QuickFIX 1.9.2 with the necessary > changes to Field.h, Parser.cpp and ThreadedSocketConnector.{cpp,h} to > deal with NUL bytes in messages. > > Clearly this must be a pretty uncommon need, otherwise it would have > been raised on this list before, but if anyone plans on using > encrypted messages or moving around messages with binary Data fields, > this patch would be a big win. > > --=20 > Caleb Epstein > cal...@gm... > <quickfix-1.9.2-allow-nuls.diff> ----------------------------------------------------------------- Visit our Internet site at http://www.reuters.com Get closer to the financial markets with Reuters Messaging - for more information and to register, visit http://www.reuters.com/messaging Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. |