[Quickfix-developers] potential infinite loop in QuickFIX Message constructor
Brought to you by:
orenmnero
From: Yihu F. <Yih...@re...> - 2004-09-27 20:59:49
|
Oren, =20 There is a bug in QuickFIX Message constructor which may exists in all versions. An ill-formatted FIX message can let the constructor run into a tight infinite loop. If the FIX message has an extra white space at the end of trailer "8=3DFIX.4.0<SOH>...<SOH>10=3Dxxx<SOH> ", or any extra characters in that matter, the constructor calls setString() and results in an infinite loop. =20 The fix is to check the value of the equalSign and throw an exception if not found. The diff of current CVS Message.cpp should be: =20 560a561,562 > if (equalSign =3D=3D std::string::npos) > throw InvalidMessage(); =20 Thanks. =20 -Yihu ----------------------------------------------------------------- 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. |